"fail", "msg"=>"Mac Quan Inc:)")); die(); die(); } $web = curl('https://m.facebook.com/presma/user_search_typeahead/?search_mode=ANYONE_EXCEPT_VERIFIED_ACCOUNT&av=2455249164509507&eav=AfYtI41W9PDS8NJKQAHbSso_CI7u-K9OXnHxYOgHH8g2bOaJSZLsT1PkxZmKAodIeL-8X3E89QCdN8hMHC8GrM85&q='.$data.'&session_id=undefined&m_sess=&fb_dtsg_ag=AQw_Vc_PX-1rjRjMm80mPYAch7yuP550FX8X24o-x-RHAw%3AAQxL6e0O8VUNTuaADTg8cG8yKKrfV16iR91wgraTWeprlg&jazoest=27734&__dyn=1KQEGiFo525Ujwh8-F42mml3onxG6UO3m2i5UfXw9y3q327E39x64o720SUhwem0iy1gCwSxu0BU3JxO1ZxObwOwWwt8-0mWeKdwbK0JE52229wcq0C9EdE2YxW0D86i0N85G0zE16o&__csr=&__req=e&__a=AYnjgXSBrLjDRKhqZBLyLbU9DoM3C1m_vH1egkQ0XfaRmt13Y6i1w2HlS_R4a_9ZXapUqrecXn5i4Sodt4S0c-4noAOGasClaefV5H21RuD6Ng&__user=100015578112958',$cookie); $jsondata = explode(']',explode('payload":[',$web)[1])[0]; $json = json_decode($jsondata,true); if($json['uid'] == ""){ echo json_encode(array("status"=>"fail", "msg"=>"fail")); die(); } $web1 = curl('https://mbasic.facebook.com/'.$json['uid'].'?v=timeline',$cookie); $nam = explode('',explode('
',explode('
',$web1)[0])[17])[1]; for($i = $namgoc; $i >= 1;$i--){ if($nam == ""){ $nam = explode('',explode('
',explode('
',$web1)[0])[$i])[1]; } } $info = array( "name"=>$json['text'], "uid"=>$json['uid'], "nam"=>$nam, "avatar"=>$json['photo'] ); echo json_encode($info); function curl($url,$cookie) { $agents = array( 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:7.0.1) Gecko/20100101 Firefox/7.0.1', 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.9) Gecko/20100508 SeaMonkey/2.0.4', 'Mozilla/5.0 (Windows; U; MSIE 7.0; Windows NT 6.0; en-US)', 'Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_7; da-dk) AppleWebKit/533.21.1 (KHTML, like Gecko) Version/5.0.5 Safari/533.21.1' ); $ch = @curl_init(); curl_setopt($ch, CURLOPT_URL, $url); $head[] = "Connection: keep-alive"; $head[] = "Keep-Alive: 300"; $head[] = "Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7"; $head[] = "Accept-Language: en-us,en;q=0.5"; curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Linux; Android 9; Nokia 3.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.136 Mobile Safari/537.36'); //curl_setopt($ch, CURLOPT_USERAGENT, $agents[rand(0,3)]); curl_setopt($ch, CURLOPT_ENCODING, ''); curl_setopt($ch, CURLOPT_COOKIE, $cookie); curl_setopt($ch, CURLOPT_HTTPHEADER, $head); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE); curl_setopt($ch, CURLOPT_TIMEOUT, 60); curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 60); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, TRUE); $page = curl_exec($ch); curl_close($ch); return $page; }