ltdpaste

Code Curl Like Host PHP

Jul 5th, 2018
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 2.16 KB | None | 0 0
  1. <?php
  2. set_time_limit(0);
  3.     function post_data($site,$data,$ref,$ajax){
  4. $datapost = curl_init();
  5. if($ajax == true){
  6. $headers = array("X-Requested-With: XMLHttpRequest");
  7. }else{
  8. $headers = array('Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8',
  9. 'Accept-Language: vi-VN,vi;q=0.9',
  10. 'Content-Type: application/x-www-form-urlencoded
  11. ');
  12. }
  13. curl_setopt($datapost, CURLOPT_URL, $site);
  14. curl_setopt($datapost, CURLOPT_TIMEOUT, 40000);
  15. curl_setopt($datapost, CURLOPT_HEADER, TRUE);
  16. curl_setopt($datapost, CURLOPT_HTTPHEADER, $headers);
  17. curl_setopt($datapost, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.124 Safari/537.36');
  18. curl_setopt($datapost, CURLOPT_FOLLOWLOCATION, TRUE);
  19. curl_setopt($datapost, CURLOPT_SSL_VERIFYPEER, TRUE);
  20. curl_setopt($datapost, CURLOPT_REFERER, $ref);
  21. curl_setopt($datapost, CURLOPT_COOKIEJAR, __DIR__ .'/cookie.txt');
  22. curl_setopt($datapost, CURLOPT_COOKIEFILE, __DIR__ .'/cookie.txt');
  23. if($data){
  24. curl_setopt($datapost, CURLOPT_POST, TRUE);
  25. curl_setopt($datapost, CURLOPT_POSTFIELDS, $data);
  26. }
  27. curl_setopt($datapost, CURLOPT_RETURNTRANSFER, true);
  28. return curl_exec ($datapost);
  29. }
  30.    
  31. $token = 'EAACW5Fg5N2IBAE0wFfUY9LeIfrKaj9bxrobtuS4c6D9JN1Ulv2QZCODND23ixrZCfRM77PA0hZBTHAt31x6ZCn9cx9l1lBHIdas87O9Tr3x2vd6mpG8ZBHhO4PrBHDCgH1CL0MxQmS6ZAuTdtvn1AtBSBTm5zQZBlzrXetN8fbl41ZAnYSspg6DZAfLEg3xm3ACAZD'; // thay token vào Đây
  32. $idfb = '100010217347890'; // id FB  bỏ vô đây
  33. $graph = json_decode(file_get_contents('https://graph.facebook.com/'.$idfb.'/feed?fields=id&access_token='.$token), true);
  34. $id_stt = explode('_',$graph['data'][0]['id']);
  35. $id = $id_stt[1];
  36.  
  37. if(isset($id)){
  38.   // web 1
  39.  $get = post_data('https://begen.co/','','https://begen.co/',false);
  40.  preg_match('/name="csrf" value="(.*?)"/',$get,$vg);
  41.  $csrf = $vg[1];
  42.  echo post_data('https://begen.co/kontrol.php','token='.$token.'&terms=on&csrf='.$csrf,'https://begen.co/',false);
  43.  echo post_data('https://begen.co/l/basla.php','bgid='.$id.'&gg='.$idfb.'&lmt=35','https://begen.co/',true);
  44.   }else{
  45. echo 'Token Die rồi thì phải Không lấy được IDSTT';
  46. }
  47. ?>
Add Comment
Please, Sign In to add comment