hello i try to make a grabber but its not working its code
now i explain what i wanti want that all sms which is in page showing like sms and then sms share + forum link that the any copy with one click please help me i want this grabber like this i give you demo http://fbcomments.tk/status please help me i try so hard but not working
PHP Code:
<?php
$site_url = 'http://smsming.com/cat/April-Fools-Day-Sms.html';
$ch = curl_init();
$timeout = 5; // set to zero for no timeout
curl_setopt ($ch, CURLOPT_URL, $site_url);
curl_setopt ($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
ob_start();
curl_exec($ch);
curl_close($ch);
$file = ob_get_contents();
ob_end_clean();
function pick($start,$stop,$from){
$from=explode($start,$from);
$from=explode($stop,$from[1]);
$from=$from[0];
return $from;
}
$linksource=pick('<div class="pendu">','...</a> <br>',$file);
$page=str_replace('href="/cat/','href="?cat=',$linksource);
$chunk = explode('<div class="sms">', $page);
//print_r($chunk);
$count = count($chunk);
for ($i=1; $i < $count; $i++)
{
$match_name = preg_match('/sms:?body=(.*)">/i', $chunk[$i], $link);
echo "link=:$link[1]<br>";
}
echo "<hr>";
?>
Comment