Search Results
… $feed = new SimplePie(); $feed->set_feed_url('http://www.example.com/feed'); $feed->init(); echo '<ul>'; // … also pull out categories from your Wordpress blog by setting the feed URL to something like this. …
… function to validate URL's using the FILTER_VALIDATE_URL flag and someone pointed out recently that this function has not only changed since … a number of flags can be added to change the way that this function works. Here are the flags available. FILTER_FLAG_SCHEME_REQUIRED Require … 'http://www.hashbangcode.com' => array(), 'http://www.hashbangcode.com/blog' => array(), 'http://www.example.com/index.html#anchor' => …
Article: PHP Paragraph Regular Expression
… I quite often find the need to extract a section of text from the beginning of a blog post or similar to be used as the excerpt. I normally use a function that …
… good idea and saves you time in the long run as you only have to edit one file to change an item on the menu. However, what if you only want to display a menu or sub-menu when a particular page is loaded? This is a common problem, … we are looking at has the following URL. http://www.hashbangcode.com/blog/example/test/123/test.php Then our array contained in the $parts …
… the other being the subjects. It will then create the necessary RSS URLs and use the multi-feed aggregator feature of SimplePie to collate … $feeds[] = 'http://upcoming.yahoo.com/syndicate/v2/search_all/?q='.urlencode($subject).'&loc='.$location.'&rt=1'; } } // create SimplePie … $feed = new SimplePie(); // add feeds to SimplePie $feed->set_feed_url($feeds); // turn off feed ordering by date …
Article: PHP Function To Get TinyURL
… a service where you can convert a long URL string to a really small one. For instance, the following URL, which points to the Googleplex on … This is perfect for posting to Twitter or similar microblogging platforms as it saves lots of character space. Luckily, …
Article: Planet PHP
… Planet PHP is a feed aggregator blog specifically for PHP related blogs. There are a good number of blogs that the site uses to update …
… I talked a while ago about Adding Code To Wordpress Blogs And Comments , but I decided that it needed a bit of code to do this automatically. So here it is, prepared …