Home   |   TWP Auctions   |   Contact ...
The Website Professionals
Real world webmaster resources.
TWP Auctions - the free eBay script RSS feed Twitter

PHP stuff

Display RSS feeds using PHP

Display RSS feeds using PHP

Everyone knows that you can display RSS feeds on your website using third party widgets, but you usually won’t have much control over how the feed content is blended in with your own page, and if the widget goes offline, or goes out of business, then you’re in trouble.

Most hosts now provide cURL and PHP5, which makes displaying RSS feeds on your website easy enough to do it yourself.

Here’s a really simple example that pulls in the Yahoo news feed, grabs the title and story as variables, and then spits them back out – displaying the title in bold, followed by the story:

Continue reading…

Create PHP dates in the future

The date 2 weeks from today will be:July 3, 2013

Here’s how to display a date in the future (say 2 weeks from today):

<?php
$future = mktime(0,0,0,date("m"),date("d")+14,date("Y"));
$mydate = date("F j, Y", $future);
echo $mydate;
?>

Make your PHP pretty

Another nice little PHP tool is PHPFormatter, where you can paste in your messy PHP and it will format it to several preset styles (including PEAR). This is really a great tool for those of us that write really messy code, and then can’t work it out a few days later.

Post PHP code in WordPress

I found a great website that will transform PHP into html for pasting into WordPress, forums, or anywhere. It’s here.

Featured webmaster products for June 2013:

Copyright © 2013 The Website Professionals - All rights reserved
Privacy policy