0
你好,我想用REMOTE IP登錄Facebook。忽略IP更改阻止。那麼一切都在工作。我只有IP更改問題。當IP更改Facebook發送檢查點並允許IP仍然無法工作時。所以請給我任何解決方案如何做到這一點。使用REMOTE_ADDR curl登錄到Facebook php
$ipku = $_SERVER['REMOTE_ADDR'];
$ip = array("REMOTE_ADDR: $ipku", "HTTP_X_FORWARDED_FOR: $ipku");
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://mbasic.facebook.com/login.php');
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS,'charset_test=€,´,€,´,水,Д,Є&email='.urlencode($em).'&pass='.urlencode($pa).'&login=Login');
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_COOKIEJAR,$cookie);
curl_setopt($ch, CURLOPT_COOKIEFILE,$cookie);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch,CURLOPT_HTTPHEADER,$ip);
curl_setopt($ch, CURLOPT_USERAGENT,'Opera/9.80 (Series 60; Opera Mini/6.5.27309/34.1445; U; en) Presto/2.8.119 Version/11.10');
curl_setopt($ch, CURLOPT_FAILONERROR, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER,0);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_REFERER,
"https://mbasic.facebook.com");
$data = curl_exec($ch);
curl_close($ch);