Forum Moderators: coopster
<?php
$linkpage=file_get_contents("http://www.toastypost.com/twit/?q=orlando%20brown");
$start = strpos($linkpage,'border="0" /></a>');
$end = strpos($linkpage,'Copyright',$start);
$linkpage = substr($linkpage,$start,$end-$start);
preg_match_all(
'/href="http:\/\/t.co\/(.*?)"/s',
$linkpage,
$links,
PREG_SET_ORDER
);
foreach ($links as $link) {
$alink='http://t.co/'.$link[1];
echo $alink.' has ';
$html = file_get_contents($alink);
preg_match_all(
'/Orlando Brown/s',
$html,
$posts,
PREG_SET_ORDER
);
$result = count($posts);
echo $result.' instances or Orlando Brown<br><br>';
}
?>