@Burti; PHP tarafında POST isteği göndermenin binbir türlü yolu var.
#1: file_get_contents:
<?php
$data = http_build_query(array('username' => 'saintx', 'password' => '123456789'));
$options = array('http' => array('method' => 'POST', 'header' => 'Content-Type: application/x-www-form-urlencoded', 'content' => $data));
$context = stream_context_create($options);
$url = 'https://www.facebook.com/login.php';
$response = file_get_contents($url, false, $context);
// print_r($response); /* {"status":true} */
$result = json_decode($response);
if ($result->status !== false)
{
// echo "Başarıyla giriş yapıldı.";
}#2 cURL:
<?php
$data = array('username' => 'saintx', 'password' => '123456789');
$url = 'https://www.facebook.com/login.php';
$handle = curl_init();
curl_setopt_array(array(
CURLOPT_URL => $url,
CURLOPT_BINARYTRANSFER => true,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_NOBODY => true,
CURLOPT_HEADER => false,
CURLOPT_POST => true,
CURLOPT_POSTFIELDS => true,
));
$response = curl_exec($handle);
curl_close($handle);
// print_r($response); /* {"status":true} */
$result = json_decode($response);
if ($result->status !== false)
{
// echo "Başarıyla giriş yapıldı.";
}#3 fsockopen:
<?php
$useragent = 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Firefox/31.0';
$data = 'username=saintx&password=123456789';
$host = 'www.facebook.com';
$port = 443;
$timeout = 15;
$handle = fsockopen($host, $port, $errno, $errstr, $timeout);
$request = "POST /login.php HTTP/1.1\r\n";
$request .= "Host: {$host}\r\n";
$request .= "User-Agent: {$useragent}\r\n";
$request .= "Content-Type: application/x-www-form-urlencoded\r\n";
$request .= "Content-Length: " . strlen($data) . "\r\n";
$request .= "Connection: close\r\n\r\n";
$request .= $data . "\r\n\r\n";
fwrite($handle, $request);
$response = "";
while ( ! feof($handle))
{
$response .= fgets($handle, 4096);
}
fclose($handle);
// print_r($response); /* {"status":true} */
$result = json_decode($response);
if ($result->status !== false)
{
// echo "Başarıyla giriş yapıldı.";
}Burada en kolay yol cURL kullanmak oluyor tabi ki de hangisini kullanman gerektiğine sen karar vereceksin.