How PHP Gets the latest news from Twitter,
This example explains how PHP gets the latest news from Twitter. Share to everyone for your reference. The implementation method is as follows:
<?phpfunction get_status ($twitter _id, $hyperlinks = True) { $c = Curl_init (); curl_setopt ($c, Curlopt_url, "http://twitter.com/statuses/user_timeline/$twitter _id.xml?count=1"); curl_setopt ($c, Curlopt_returntransfer, 1); $SRC = curl_exec ($c); Curl_close ($c); Preg_match ('/
(. *) <\/text>/', $SRC, $m); $status = Htmlentities ($m [1]); if ($hyperlinks) $status = ereg_replace ("[[: alpha:]]+://[^<>[:space:]]+[[:alnum:]/]", "\\0", $status); return ($status);}? >
I hope this article is helpful to everyone's PHP programming.
http://www.bkjia.com/PHPjc/984010.html www.bkjia.com true http://www.bkjia.com/PHPjc/984010.html techarticle PHP's approach to getting the latest news from Twitter, this article explains how PHP gets the latest news from Twitter. Share to everyone for your reference. The concrete implementation method is as follows: Phpfunction get_s ...