@wpCanyonThemes
On the PHP snippet it tells me that the 2nd line($stepOne …) as an syntax error.
what’s wrong?
The forum screwed the code.
Change ”\\” to \”
What am i doing wrong?
<div id="twit">
<p>
<?php function parse_feed($feed) {
$stepOne = explode("<content type=html\?>", $feed);
$stepTwo = explode("", $stepOne[1]);
$tweet = $stepTwo[0];
$tweet = str_replace("<", "<", $tweet);
$tweet = str_replace(">", ">", $tweet);
return $tweet;
}
function getTweet(){
$feed = "http://search.twitter.com/search.atom?q=from:ronkaa&rpp=1";
$twitterFeed = file_get_contents($feed);
echo parse_feed($twitterFeed);
}
?>
</p>
</div>
I paste this code in my theme and it doesn’t echo any thing ..
After…
echo parse_feed($twitterFeed); }
add
getTweet();
- Author had a Free File of the Month
- Bought between 1 and 9 items
- Exclusive Author
- Has been a member for 3-4 years
- Referred between 200 and 499 users
- Sold between 50 000 and 100 000 dollars
That’s how I use it on my site and it does not depend on PHP only jQuery is required. http://css-tricks.com/snippets/jquery/display-last-tweet/
- Microlancer Beta Tester
- Sold between 250 000 and 1 000 000 dollars
- Author was Featured
- Item was Featured
- Has been a member for 4-5 years
- Author had a File in an Envato Bundle
- Referred between 200 and 499 users
- Author had a Free File of the Month
Much better way, using PHP5 & cURL:
http://scriptplayground.com/tutorials/php/Twitter-Integration-Class-Using-PHP5-and-cURL/
I cant get any of the code you guys gave me to work 
- Author had a Free File of the Month
- Bought between 1 and 9 items
- Exclusive Author
- Has been a member for 3-4 years
- Referred between 200 and 499 users
- Sold between 50 000 and 100 000 dollars
r0nka said
I cant get any of the code you guys gave me to work![]()
Use the one I posted ron. It’s very simple and works great.
