note 43903 added to ref.curl

From: Date: Thu, 08 Jul 2004 03:39:23 +0000
Subject: note 43903 added to ref.curl
Groups: php.notes 
Request: Send a blank email to php-notes+get-72851@lists.php.net to get a copy of this message
I try to login via https on a website and I always get the same wrong answer I feel that I miss some curl_setopt(...) calls, but which one? I'm trying to login automatically to www.ups.com so I do a <?php $url = "https://wwwapps.ups.com:443/cclamp/login"; $submit_vars["sret"] = "http://www.ups.com/content/us/en/index.jsx"; $submit_vars["uret"] = "http://www.ups.com/content/us/en/index.jsx"; $submit_vars["userid"] = "YOUR LOGIN"; $submit_vars["password"] = "YOUR PASSWORD"; $submit_vars["repl_fname.x"] = "2"; $submit_vars["repl_fname.y"] = "7"; $data = "sret=".$submit_vars["sret"] ."&". "uret=".$submit_vars["uret"] ."&". "userid=".$submit_vars["userid"] ."&". "password=".$submit_vars["password"] ."&". "repl_fname.x=".$submit_vars["repl_fname.x"] ."&". "repl_fname.y=".$submit_vars["repl_fname.y"] ; $ch = curl_init(); curl_setopt($ch, CURLOPT_RETURNTRANSFER,1); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_COOKIEFILE, "cook"); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, $data); $result = curl_exec($ch); // run the whole process curl_close($ch); echo $result; ?> Any help? Thanks ---- Manual Page -- http://www.php.net/manual/en/ref.curl.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+43903 Delete -- http://master.php.net/manage/user-notes.php?action=delete+43903&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+43903&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#72851) next »