PHP Twitter Feed

We have the following PHP Twitter feed which works fine with all our feeds except the one shown below.

This job entail making the code work with the Twitter account


## Deliverables

PHP code shown here


$username = "holiday2europe";

$num = 5;

$feed = "[url removed, login to view]:" . $username . "&rpp=" . $num;

$newfile = dirname(__FILE__)."/[url removed, login to view]";

$file = dirname(__FILE__)."/[url removed, login to view]";

copy($feed, $newfile);

$oldcontent = @file_get_contents($file);

$newcontent = @file_get_contents($newfile);

if($oldcontent != $newcontent) {

copy($newfile, $file);


$tweets = @file_get_contents($file);

$tweets = json_decode($tweets);

echo "<ul>";

for($x=0;$x<$num;$x++) {

$str = ereg_replace("[[:alpha:]]+://[^<>[:space:]]+[[:alnum:]/]","<a href=\"\\0\">\\0</a>", $tweets->results[$x]->text);

$pattern = '/[#|@][^\s]*/';

preg_match_all($pattern, $str, $matches);

foreach($matches[0] as $keyword) {

$keyword = str_replace(")","",$keyword);

$link = str_replace("#","%23",$keyword);

$link = str_replace("@","",$keyword);

if(strstr($keyword,"@")) {

$search = "<a href=\"[url removed, login to view]$link\">$keyword</a>";

} else {

$link = urlencode($link);

$search = "<a href=\"[url removed, login to view]$link\" class=\"grey\">$keyword</a>";


$str = str_replace($keyword, $search, $str);


echo "<li>".$str."</li>\n";


echo "</ul>";


기술: 공학, MySQL, PHP, 프로젝트 관리, 소프트웨어 아키텍처, 소프트웨어 테스팅, 웹 호스팅, 웹사이트 관리, 웹사이트 테스팅

확대 보기: ul com, twitter com search, str pattern, search twitter com, twitter search, str, php json , JSON PHP, code twitter, twitter json, class json, json_decode, rpp, rpp project, feed file, alpha project management, echo file php, json search, php echo file, search tweets

고용주 소개:
( 48건의 리뷰 ) Sheffield, United Kingdom

프로젝트 ID: #3807346

이 프로젝트의 입찰 현황은 다음과 같습니다. 입찰자: 2명, 평균 입찰가: $17


See private message.

$38.25 USD (1일 이내)
(97 리뷰)

See private message.

$25.5 USD (1일 이내)
(15 리뷰)

See private message.

$8.5 USD (1일 이내)
(24 리뷰)