Vote count:
0
//curl login
$username=""; $password=""; $url="http://ift.tt/11XB8OY"; $data="utf8=%E2%9C%93&authenticity_token=V4%24.airbnb.com%24VOCVIB2kJAU%24dzWqEKLhvHk9D_Iel_IWH-F4GGCP6kSpM_IYg8QQJc8%3D&email=$username&password=$password&remember_me=true";
$curl = curl_init($url); curl_setopt($curl, CURLOPT_TIMEOUT, 10); curl_setopt($curl,CURLOPT_USERAGENT,'Mozilla/5.0 (Windows; U; Windows NT 5.1; tr; rv:1.9.2.12) Gecko/20101026 Firefox/3.6.12 ( .NET CLR 3.5.30729; .NET4.0E)'); curl_setopt($curl, CURLOPT_REFERER, 'http://ift.tt/XFeuIx'); curl_setopt($curl, CURLOPT_POST, true); curl_setopt($curl, CURLOPT_POSTFIELDS, $data); curl_setopt($curl, CURLOPT_COOKIEFILE,"C:\Appserv\www\cookie.txt"); curl_setopt($curl, CURLOPT_COOKIEJAR, "C:\Appserv\www\cookie.txt"); curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, 2); curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true); curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); $result = curl_exec($curl); curl_close($curl);
//curl auto add card
$url2="http://ift.tt/1vnAHHy"; $data2="acculynk%5BsessionId%5D=&acculynk%5BaccountToken%5D=&acculynk%5BlastFour%5D=&acculynk%5BfirstSix%5D=&payment_method_nonce=&credit_card%5Bcc_type%5D=visa&credit_card%5Bcc_number%5D=4111222233334444&credit_card%5Bcc_expire_month%5D=02&credit_card%5Bcc_expire_year%5D=18&credit_card%5Bfirst_name%5D=david&credit_card%5Blast_name%5D=crooks&credit_card%5Bzip%5D=11111&payment_country=US&payment_method=&credit_card%5Bcountry%5D=UA&payment_method_nonce=&from_guest_wallet=true&luhn_passed=true"; $curl = curl_init($url2); curl_setopt($curl, CURLOPT_HEADER,true); curl_setopt($curl, CURLINFO_HEADER_OUT,true); curl_setopt($curl, CURLOPT_TIMEOUT, 10); curl_setopt($curl, CURLOPT_POST, true); curl_setopt($curl, CURLOPT_POSTFIELDS, $data2); curl_setopt($curl, CURLOPT_COOKIEFILE, "C:\Appserv\www\cookie.txt"); curl_setopt($curl, CURLOPT_COOKIEJAR,"C:\Appserv\www\cookie.txt"); curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, 1); curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true); curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); $result2 = curl_exec($curl); curl_close($curl);
===> ERROR http/1.1 401 unauthorized i want "echo $result2"
{"errors":[{"field":"......
help me thanks
CURL error http/1.1 401 unauthorized
Aucun commentaire:
Enregistrer un commentaire