* About to connect() to proxy 91.77.162.117 port 8080 (#0)
* Trying 91.77.162.117... * connected
* Connected to 91.77.162.117 (91.77.162.117) port 8080 (#0)
* Establish HTTP proxy tunnel to login.vk.com:443
> CONNECT login.vk.com:443 HTTP/1.1
Host: login.vk.com:443
Proxy-Connection: Keep-Alive
accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
content-type: application/x-www-form-urlencoded
user-agent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.86 Safari/537.36
< <html>
< <head><title>400 Bad Request</title></head>
< <body bgcolor="white">
< <center><h1>400 Bad Request</h1></center>
< <hr><center>nginx</center>
< </body>
< </html>
* Proxy CONNECT aborted
* Closing connection #0
$headers = Array(
'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8',
'content-type' => 'application/x-www-form-urlencoded',
'user-agent' => 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.86 Safari/537.36'
);
$get_main_page = post('https://vk.com', Array(
'headers' => Array(
'accept: '.$headers['accept'],
'content-type: '.$headers['content-type'],
'user-agent: '.$headers['user-agent']
)
));
function post($url = null, $params = null, $proxy = null, $proxy_userpwd = null) {
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_HEADER, 1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 60);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);
$fOut = fopen($_SERVER["DOCUMENT_ROOT"].'/'.'curl_out.txt', "w" );
curl_setopt ($ch, CURLOPT_VERBOSE, 1);
curl_setopt ($ch, CURLOPT_STDERR, $fOut );
if(isset($params['params'])) {
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $params['params']);
}
if(isset($params['headers'])) {
curl_setopt($ch, CURLOPT_HTTPHEADER, $params['headers']);
}
if(isset($params['cookies'])) {
curl_setopt($ch, CURLOPT_COOKIE, $params['cookies']);
}
if($proxy) {
curl_setopt($ch, CURLOPT_PROXY, $proxy);
if($proxy_userpwd) {
curl_setopt($ch, CURLOPT_PROXYUSERPWD, $proxy_userpwd);
}
}
if(!$result = curl_exec($ch)) {
$result = curl_error($ch);
}
print_r(curl_getinfo($ch));
$result_explode = explode("\r\n\r\n", $result);
$headers = ((isset($result_explode[0])) ? $result_explode[0]."\r\n" : '').''.((isset($result_explode[1])) ? $result_explode[1] : '');
$content = $result_explode[count($result_explode) - 1];
preg_match_all('|Set-Cookie: (.*);|U', $headers, $parse_cookies);
$cookies = implode(';', $parse_cookies[1]);
curl_close($ch);
return Array('headers' => $headers, 'cookies' => $cookies, 'content' => $content);
}
if(userCurrentURL() == siteURL().'/apanel?act=hide&id=' OR strpos(userCurrentURL(), 'apanel?act=hide&id=')) {
$id = substr(userCurrentURL(), mb_strlen(siteURL())+20);
$query = mysql_query("UPDATE `catch` SET `hide` = '1' WHERE `id` = $id'");
$res = mysql_query($query) or die (mysql_error());
require_once $_SERVER['DOCUMENT_ROOT'].'/core/pages/apanel.php';
}