Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function getFacebookIdentifier($ProfileContent_result){
- if(preg_match('/"entity_id":([0-9]+)/', $ProfileContent_result, $matches)){
- return $matches[1];
- }
- return false;
- }
- function getFacebookProfileContent($name){
- return sendRequest('https://m.facebook.com/'.$name, [
- 'User-Agent: Mozilla/5.0 (BB10; Kbd) AppleWebKit/537.10+ (KHTML, like Gecko) Version/10.1.0.4633 Mobile Safari/537.10+'
- ]);
- }
- function sendRequest($url, $headers = []){
- $ch = curl_init();
- curl_setopt_array($ch, [
- CURLOPT_URL => $url,
- CURLOPT_HTTPHEADER => $headers,
- CURLOPT_SSL_VERIFYHOST => 0,
- CURLOPT_SSL_VERIFYPEER => 0,
- CURLOPT_FAILONERROR => 1,
- CURLOPT_RETURNTRANSFER => 1
- ]);
- return curl_exec($ch);
- }
- $nome = 'inkeliz';
- if($id = getFacebookIdentifier( getFacebookProfileContent($nome) )){
- echo $id;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement