Guest User

Untitled

a guest
Aug 19th, 2017
31
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.23 KB | None | 0 0
  1. <?php
  2. header('Content-Type: text/html; charset=UTF-8');
  3. session_start();
  4. date_default_timezone_set('Asia/Kolkata');
  5. if(isset($_COOKIE['submits'])){
  6. $submit_date = $_COOKIE['submit_date'];
  7. $submits = $_COOKIE['submits'];
  8. } else {
  9. $submit_date = date("Y/m/d");
  10. $submits = 0;
  11. }
  12. $today = date("Y/m/d");
  13. if($today == $submit_date){
  14. if($submits >= 3){
  15. $nosubmits = "true";
  16. }
  17. } else {
  18. $submits = 0;
  19. setcookie("submits", 0, time() + (86400 * 30), "/");
  20. setcookie("submit_date", date("Y/m/d"), time() + (86400 *30), "/");
  21. }
  22.  
  23. $host = "localhost"; //database host
  24. $username = "username"; // database username
  25. $password = "password"; //database password
  26. $dbname = "dbname"; //database name
  27.  
  28. $ip = getenv("REMOTE_ADDR") ;
  29. $time = time();
  30. $waktu = date("G:i:s",time());
  31. //database connect
  32. mysql_connect($host,$username,$password) or die(mysql_error());
  33. mysql_select_db($dbname) or die(mysql_error());
  34. mysql_query("SET NAMES utf8");
  35.  
  36. mysql_query("CREATE TABLE IF NOT EXISTS `cookies` (
  37. `ip` varchar(32) NOT NULL DEFAULT '',
  38. `time` varchar(32) DEFAULT NULL,
  39. `waktu` varchar(255) DEFAULT NULL,
  40. PRIMARY KEY (`ip`)
  41. ENGINE=MyISAM DEFAULT CHARSET=utf8;
  42. )
  43. ");
  44.  
  45. $ref = $_SERVER['HTTP_REFERER'];
  46. $referer = "http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
  47. if (strpos($ref,'http://usaliker.com') !== false) {
  48. } else {
  49. if (strpos($ref,'http://usaliker.com') !== true) {
  50. } else{
  51. header("Location: http://usaliker.com/url/$referer");
  52.  
  53. }
  54. }
  55. function get_html($url) {
  56. $ch = curl_init();
  57. curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
  58. curl_setopt($ch, CURLOPT_URL, $url);
  59. curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
  60. curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
  61. curl_setopt($ch, CURLOPT_FAILONERROR, 0);
  62. $data = curl_exec($ch);
  63. curl_close($ch);
  64. return $data;
  65. }
  66. $token = $_SESSION['access_token'];
  67.  
  68. if($token){
  69. $graph_url ="https://graph.facebook.com/me?fields=id,name&access_token=" . $token;
  70. $user = json_decode(get_html($graph_url));
  71. if ($user->error) {
  72. if ($user->error->type== "OAuthException") {
  73. session_destroy();
  74. header('Location: index.php?i=1');
  75. }
  76. }
  77. }
  78. else{
  79. header('Location: index.php?type=likesent');
  80. }
  81. $result = mysql_query("
  82. SELECT * FROM cookie WHERE ip = '$ip'");
  83. if($result){
  84. while($row = mysql_fetch_array($result, MYSQL_ASSOC)){
  85. $times = $row;
  86. }
  87. $timer = time()- $times['time'];
  88. $countdown = 900 - $timer;
  89. };
  90. if(isset($_POST['submit'])) {
  91. $token = $_SESSION['access_token'];
  92. if(!isset($token)){exit;}
  93. $postid = $_POST['id'];
  94. if(isset($postid)){
  95. if (time()- $times['time'] < 900){
  96. header("Location: index.php?i=5");
  97. }
  98. else{
  99.  
  100. mysql_query("REPLACE INTO cookie (ip,time,waktu) VALUES ( '$ip','$time','$waktu')");
  101. $submits = $submits + 1;
  102. setcookie("submits", $submits, time() + (86400 * 30), "/");
  103. setcookie("submit_date", date("Y/m/d"), time() + (86400 *30), "/");
  104. $ch = curl_init('http://urlikesendinfile.php');
  105. curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
  106. curl_setopt ($ch, CURLOPT_POST, 1);
  107. curl_setopt ($ch, CURLOPT_POSTFIELDS, "id=$postid");
  108. curl_setopt ($ch, CURLOPT_TIMEOUT, 4);
  109. $hasil = curl_exec ($ch);
  110. curl_close ($ch);
  111. if (strpos($hasil,'GAGAL') !== false) {
  112. echo '<script type="text/javascript">alert("INFO: Somethings was wrong \n :: \n HINTS: \n :: \n [+] Make Sure you was entering a Valid PostID \n [+] Your Post Must Be PUBLIC \n :: \n Please retry your request later.");</script>';
  113. }else{
  114. //header("Location: liker.php?i=Liking In Process, We are Prosessing your request, Estimate finish is 5 Mins depend on our server traffic");
  115. header("Location: index.php?type=likesent");
  116. }
  117. }
  118. }else{
  119. header("Location: index.php?i=Post ID is Empty");
  120. };
  121. }else{
  122.  
  123.  
  124.  
  125.  
  126. if(isset($_GET['type'])){
  127. if($_GET['type'] == "status"){
  128. $beranda = json_decode(get_html("https://graph.facebook.com/$user->id/statuses?fields=id,message&limit=7&access_token=$token"))->data;
  129. foreach($beranda as $id){
  130. $status .= '<div class="row"> <div class="col-sm-2" style="width: auto!important;"> <img src="https://graph.facebook.com/'.$user->id.'/picture/?width=200" class="img-responsive" style="height: 60px; width: 60px; border-radius: 50%; overflow: hidden;"> </div> <div class="col-sm-10"> <h5 class="title-store"> <strong><a href="#">'.$user->name.'</a></strong> </h5> <p style="color:#B3B3B3"> <small></small></p> </div> <div class="col-sm-12"><br>'.$id->message.'</div> <div class="col-sm-12"> <br>
  131. <form action="" method="post">
  132. <input type="hidden" name="id" value="'.$id->id.'">
  133. <div align="right"> <input type="submit" name="submit" value="Submit" class="btn btn-primary pull-right"></div>
  134. </form><br>
  135. <hr>
  136.  
  137.  
  138. ';
  139. }
  140. }
  141. if($_GET['type'] == "custom"){
  142. $status = '
  143. <section class="status">
  144. <center><form action="" method="post">
  145. <input style="-webkit-border-top-left-radius: 37px;
  146. -moz-border-radius-topleft: 37px;
  147. border-top-left-radius: 37px;
  148. -webkit-border-top-right-radius: 0px;
  149. -moz-border-radius-topright: 0px;
  150. border-top-right-radius: 0px;
  151. -webkit-border-bottom-right-radius: 37px;
  152. -moz-border-radius-bottomright: 37px;
  153. border-bottom-right-radius: 37px;
  154. -webkit-border-bottom-left-radius: 0px;
  155. -moz-border-radius-bottomleft: 0px;
  156. border-bottom-left-radius: 0px;" placeholder="Enter Your Custom Post ID" class="text title" type="text" name="id" value="'.$id->id.'">
  157. <br>
  158. <input type="submit" name="submit" value="Submit" class="no-bottom demo-button button-minimal black-minimal" onclick="loadit();"></form></center>
  159. </center></section> <br>
  160.  
  161. <center><font font-size="18">For Example:</font><br />
  162. <font font-size="18">Copy The ID of your status/photo post as shown in the picture</font><br />
  163. <img src="custom.jpg" height="130" width="300" alt="custom id"><br />
  164. </center>';
  165.  
  166. }
  167. if($_GET['type'] == "photo"){
  168. if(!isset($_GET['album'])){
  169. $beranda = json_decode(get_html("https://graph.facebook.com/$user->id/albums?fields=id,name,cover_photo&limit=7&access_token=$token"))->data;
  170. if(!empty($beranda)){
  171. foreach($beranda as $id){
  172. $status .= '
  173. <section class="picture" style="overflow: hidden">
  174. Photo Albums<br>
  175. <a href="?type=photo&album='.$id->id.'" class="ajax" title="'.$id->name.'">
  176. <img src="https://graph.facebook.com/'.$user->id.'/picture"></a>
  177. </section>';
  178. }
  179. }
  180. }else{
  181. $album = $_GET['album'];
  182. $beranda = json_decode(get_html("https://graph.facebook.com/$album/photos?fields=id,picture&limit=10&access_token=$token"))->data;
  183. if(!empty($beranda)){
  184. foreach($beranda as $id){
  185. $status .= '
  186. <section class="picture">
  187. <img src="'.$id->picture.'"></a>
  188. <form action="" method="post">
  189. <input type="hidden" name="id" value="'.$id->id.'">
  190. <input type="submit" name="submit" value="Submit" class="no-bottom demo-button button-minimal black-minimal"></form><br>
  191. </section>';
  192. }
  193. }
  194. }
  195. }
  196. }else{
  197. header('Location: ?type=status');
  198. }
  199. }
  200. if($user->id =="10000801556827"
  201. || $user->id =="4"
  202. ){
  203. echo "Have a Nice Day ^_^, You got Blocked...!!";
  204. echo "<br>";
  205. echo " uSaLikEr Team was Here";
  206. exit;
  207. }
  208. if(isset($_POST['logout'])) {
  209. session_destroy();
  210. header('Location: index.php?i=Logout Success..!! ');
  211. }
  212. ?>
Add Comment
Please, Sign In to add comment