The code below is part of an rss feed parser using WordPress's simplepie fetch_feed()...
Code is:
if ($enclosure = $item->get_enclosure(0))
{
$image_thumb = $item->get_enclosure()->get_link().'screenshot.jpg';
$image = $item->get_enclosure()->get_link().'screenshot-full.jpg';
}
$link = esc_url( strip_tags( $item...
I have a classified website, and I recently changed the insertion of classifieds to use php Session variables instead of alot of POST and FORMS...
So first BEFORE changing to Sessions, it worked nice and all special characters showed up correctly.
Now that I changed to SESSIONS, I get funny characters instead of the special characters....
I have developed a custom search engine for our Magento store and I am trying to load the product collection in a very specific order (I have ranked the results according to an algorithm I designed).
I can load the product collection correctly, however it is not in the order that I would like it to be in. Here is basically how it is wor...
I've just started looking into Twig and I'm wondering how I would accomplish the following.
I have a variable $logged_in that I need to have access to in every single page on my site, I was hoping that rather than passing this to the twig renderer every single time in the data array, there would be a way for me to declare this somewhere...
this: featid = "$USER_VARIABLE"
Does not return any matches.
What filter should one use to search in a .shp attribute table?
...
I'm having a problem with this query for some reason:
$this->db->query("UPDATE schools SET name = '$name', pop = '$pop', details = '$details', numteachers = '$numteachers', recess = '$recess', equipment = '$equipment' WHERE id = '$schoolid'");
echo $this->db->affected_rows();
For some reason affected_rows prints 0 but there's no erro...
Hi
I'm lost here. I'm using this script to give users the opportunity to enter their username lijke this:domain/username
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^/]+)/?$ userpage.php?user=$1 [NC,L]
</IfModule>
Th...
A SO user asked a question to which the answer effectively was "use a locking mechanism".
While researching my answer, I discovered that there seems to be no simple, inter-process-reliable locking mechanism in PHP. flock() has a big fat warning:
On some operating systems flock() is implemented at the process level. When using a mult...
Hello,
Is there function reference integrated in PHPStorm/WebStorm ?
I mean like when i point my cursor on some php function , then I press e.g. F1 and it will show me function details (parameters, usage...) on separate page.
Is this integrated in phpstorm/webstorm ?
...
Hi people
if (preg_match_all ("/\[protected\]\s*(((?!\[protected\]|\[/protected\]).)+)\s*\[/protected\]/g", $text, $matches)) {
var_dump($matches);
var_dump($text);
}
The text is
<p>SDGDSFGDFGdsgdfog<br>
[protected]<br> STUFFFFFF<br>
[/protected]<br> SDGDSFGDFGdsgdfo...
this is my code:
comenzar = function(){
document.getElementById('gene').onclick = xmlhttpPost("generador.php");
}
xmlhttpPost = function(strURL){
xmlHttpReq = false;
self = this;
self.xmlHttpReq = new XMLHttpRequest();
self.xmlHttpReq.open('POST', strURL, true);
self.xmlHttpReq.setRequestHeader('Content-Type', 'applicati...
Is there a way to return or load the calendar by an get URL. Something like calendar.php?gotoDate=2010-10-21 ?
Many Thanks!
Edits go here (not in answers or comments):
Oops! I'm sorry: http://arshaw.com/fullcalendar/
...
Hi, I've readen a book that uses Java's Timer class... something like:
final Timer timer = new Timer();
timer.schedule(new TimerTask() {
public void run() {
/* Does something */
timer.cancel();
}
}, 5000);
Is there a way to implement that in PHP? I'm rewrinting the book examples in PHP.
Thank you.
...
Is there an application or a code I can use to check which cache functions are turned on?
On this app I'm working on, I thought there was mysql cacheing, but since I started using the SELECT SQL_NO_CACHE in one of my queries (applied yesterday), the cacheing has not stopped. This leads me to assume it's a php cache function that's occ...
hi
I have created about 4 e-commerce websites during the last few year. But they were all dommy sites whereby when the users checked out their items, they did not get to give their account detailes therefore, there wasn't any transactions made (though, i was about to keep stock and count of what was purched)
now, i recieved a real pro...
Is it possible to launch a php file from a other php file?
I know that i can include a file but i don't mean this.
Small example:
i have a script which displays something from the database
and a other script which get the latest data from a other site and update the database.
When i include the update file, the first script will reques...
Hello,
Is there function reference integrated ?
I mean like when i point my cursor on some php function , then I press e.g. F1 and it will show me function details (parameters, usage...) on separate page.
Is this integrated in CODA ?
I tried to point cursor on "mysql_query" in document edit window and then used "Help > Lookup in refe...
Hi Guys,
I am parsing text/html from web pages into an xml feed, the text/html is encoded iso-8895-1 while the XML feed must be UTF-8. I have used html entities, but am having to manually replace loads of characters, here is what I have so far (still not parsing all text)
$desc = str_replace(array("\n", "\r", "\r\n"),"",$desc);
$de...
Hi,
I was over at MailChimp's css inliner http://www.mailchimp.com/labs/inlinecss.php and I was wondering if there are any classes out there that can do this, I'd love to have it in my email code instead of going all the way over to MailChimp.
Basically I'm looking for the code, behind the page or something very similar.
Cheers.
...
I recently launched a service, meaning I can no longer work directly on the site, or I do so at a risk.
I haven't been able to find any "standard" or "best" way to make a development server. The two things I have seen are
a) Using a GIT or SVN to host the data (this doesn't quite solve my problem, I need to be able to develop somewhere...