Download:
Facebook
Coding:
index.php:
like.php:
share.php:
comment.php:
comment-box.php:
Coding:
index.php:
<html><body> <form method="post" action=""> Enter URL: <input type="text" name="url"> <input type="submit" name="submit"> </form> </body> </html>
like.php:
<?php if(isset($_POST['submit'])) { $url1=$_POST['url']; $addr="http://api.facebook.com/restserver.php?method=links.getStats&urls=".$url1; $page_source=file_get_contents($addr); $page = htmlentities($page_source); $like="<like_count>"; $like1="</like_count>"; $lik=strpos($page,htmlentities($like)); $lik1=strpos($page,htmlentities($like1)); $fullcount=strlen($page); $a=$fullcount-$lik1; $aaa=substr($page,$lik+18,-$a); $aaa1=substr($page,605,610); echo "Like Count: ".$aaa; } ?>
share.php:
<?php if(isset($_POST['submit'])) { $url1=$_POST['url']; $addr="http://api.facebook.com/restserver.php?method=links.getStats&urls=".$url1; $page_source=file_get_contents($addr); $page = htmlentities($page_source); $like="<share_count>"; $like1="</share_count>"; $lik=strpos($page,htmlentities($like)); $lik1=strpos($page,htmlentities($like1)); $fullcount=strlen($page); $a=$fullcount-$lik1; $aaa=substr($page,$lik+19,-$a); $aaa1=substr($page,605,610); echo "Share Count: ".$aaa; } ?>
comment.php:
<?php if(isset($_POST['submit'])) { $url1=$_POST['url']; $addr="http://api.facebook.com/restserver.php?method=links.getStats&urls=".$url1; $page_source=file_get_contents($addr); $page = htmlentities($page_source); $like="<comment_count>"; $like1="</comment_count>"; $lik=strpos($page,htmlentities($like)); $lik1=strpos($page,htmlentities($like1)); $fullcount=strlen($page); $a=$fullcount-$lik1; $aaa=substr($page,$lik+21,-$a); $aaa1=substr($page,605,610); echo "Comment Count: ".$aaa; } ?>
comment-box.php:
<?php if(isset($_POST['submit'])) { $url1=$_POST['url']; $addr="http://api.facebook.com/restserver.php?method=links.getStats&urls=".$url1; $page_source=file_get_contents($addr); $page = htmlentities($page_source); $like="<commentsbox_count>"; $like1="</commentsbox_count>"; $lik=strpos($page,htmlentities($like)); $lik1=strpos($page,htmlentities($like1)); $fullcount=strlen($page); $a=$fullcount-$lik1; $aaa=substr($page,$lik+25,-$a); $aaa1=substr($page,605,610); echo "<br />Comment Box Count: ".$aaa."<br /><br /><br /><br /><br /><br />"; } ?>
waoooooooooo post
ReplyDeletephp development
nice post keep sharing this post i really like this post.
ReplyDeletemore info