@ 2013-12-30T09:42:48Z <?php
$finalurl = "http://www.manta.com/";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $finalurl);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']);
curl_setopt($ch, CURLOPT_HEADER ,1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
$contents = curl_exec($ch);
curl_close($ch);
// get cookies
$cookies = array();
//var_dump(getallheaders());
preg_match_all('/Set-Cookie:(?<cookie>\s{0,}.*)$/im', $contents, $cookies);
$a= $cookies['cookie'][2];
/*echo "<pre>";
print_r($cookies['cookie']);exit;*/
$aa = explode('member_session=',$a);
$token = explode(';',$aa[1]);
$member_session = $token[0];
$cust= $cookies['cookie'][5];
$cust1 = explode('cust_id=',$cust);
$token1 = explode(';',$cust1[1]);
$cust_id = $token1[0];
$clientlogin_url = "http://www.manta.com/mb?search=grand+hyatt+new+york+10017&search_source=home";
$clientlogin_post = array(
"search" => "grand hyatt new york 10017",
"search_source" => "home"
);
$headers = array();
$headers[] = "Host:www.manta.com";
$headers[] = "Referer:http://www.manta.com/";
//$headers[] = "X-Requested-With:XMLHttpRequest";
$headers[] = "member_session=".$member_session."; refer_id_persistent=0000; cust_id=".$cust_id."";
//print_r($headers);
$curl = curl_init($clientlogin_url);
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_POSTFIELDS, $clientlogin_post);
//curl_setopt($curl, CURLOPT_HTTPHEADER, $headers);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
$response = curl_exec($curl);
// get cookies
//$cookies = array();
//preg_match_all('/Set-Cookie:(?<cookie>\s{0,}.*)$/im', $response, $cookies);
// echo $cookies['cookie'][1];
//print_r($cookies['cookie']);
echo "<pre>";
print_r($response);
?>
Enable javascript to submit You have javascript disabled. You will not be able to edit any code.
Output for git.master , git.master_jit , rfc.property-hooks Fatal error: Uncaught Error: Call to undefined function curl_init() in /in/qUlYQ:4
Stack trace:
#0 {main}
thrown in /in/qUlYQ on line 4
Process exited with code 255 . This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.
Active branches Archived branches Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page
preferences:dark mode live preview
43.03 ms | 401 KiB | 8 Q