Niche Designer

An Exploration of Niche Site Design and Development
Jan
26

PeakClick + Dreamhost = SimpleXML

Category Niche Marketing  Time  9:00 pm

I was anxious to start using PeakClick so I could give it a useful review. However, I came across an obstacle in implementing their feed. My host, Dreamhost, has file() disabled as a safety against hacking. This means that to use the PeakClick feed on Dreamhost, you need to use cURL (a php function).

The problem is that I would imagine many people who use these kinds of PPC feeds don’t know much about php and just copy and paste what PeakClick gives them. That’s certainly what I tried to do at first. Remember that customer service I spoke of that PeakClick prides themselves on so much that they make it a main selling point? Well, their exact reply to my problem was “there is most likely a bug in your script with curl, please try to debug it.” Granted, I understand it’s not their job to teach me php, but I was hoping for many a little snippet of code or atleast a resourceful link. So I decided to look for another solution to my problem.

What I found was SimpleXML. Its a great, easy way to integrate XML without any hard work. You don’t even have to know anything about php. The one requirement is that your server is running php 5. For Dreamhost this is no problem, simply go to “manage domains” and then edit your domain and click the “PHP 5” option. Then just add the SimpleXML code into your webpage wherever you want the PeakClick feed to appear. Here is the complete code:

result as $result )
{
foreach($result->record as $record)
{
#### This part determines how the results look ####
echo "<div id=\"record\">";
echo "<a href=\"" . $record->click . "\">";
echo "<h3> " . $record->title . "</h3>";
echo " <dl ><dt>" . $record->thumbnail . "</dt> <dd>" . $record->description . "</dd></dl>";
echo "</a>";
echo "</div>";
############################################################
}
}
?>

It’s really so easy. The only part you would need to change is the output. You’d probably want to style the way it looks but that can easily be done with style sheets. And you can change anything in the “echo” statements to suite your needs.

    Bookmark PeakClick + Dreamhost = SimpleXML at del.icio.us    Digg PeakClick+%2B+Dreamhost+%3D+SimpleXML at Digg.com    Bookmark PeakClick+%2B+Dreamhost+%3D+SimpleXML at Spurl.net    Bookmark PeakClick+%2B+Dreamhost+%3D+SimpleXML at Simpy.com    Bookmark PeakClick + Dreamhost = SimpleXML at NewsVine    Blink this PeakClick+%2B+Dreamhost+%3D+SimpleXML at blinklist.com    Bookmark PeakClick+%2B+Dreamhost+%3D+SimpleXML at Furl.net    Bookmark PeakClick+%2B+Dreamhost+%3D+SimpleXML at reddit.com    Fark PeakClick+%2B+Dreamhost+%3D+SimpleXML at Fark.com    Bookmark PeakClick+%2B+Dreamhost+%3D+SimpleXML at YahooMyWeb

Leave a Reply


Sponsored Link (click for more information)
70% payout every 15 days plus advanced stats analysis and lots of options to generate money.
Sponsored Link (click for more information)
Get detailed statistics on your blog.
Sponsored Link (click for more information)
With Dreamhost you get unlimited domains and subdomains hosted, 20GB Space and 1TB of Transfer for $7.95/mo.