openside("Pagerank");
$puslapis='https://webdnd.com';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "http://pagerank.bcup.lt/");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, "www=".$puslapis);
$output = curl_exec($ch);
$info = curl_getinfo($ch);
curl_close($ch);
$startposition = strpos($output,'<a href="http://pagerank.bcup.lt" target="_blank"><img src="http://pagerank.bcup.lt/img/');
if($startposition > 0){
$endposition = strpos($output,'" alt="pagerank tikrinimas" border="0" /></a>', $startposition);
//add enough chars to include the tag
$endposition += strlen('" alt="pagerank tikrinimas" border="0" /></a>');
$length = $endposition-$startposition;
$output = substr($output,$startposition,$length);
echo $output;
}
closetable();