note 43904 rejected from ref.curl by aidan

From: Date: Thu, 08 Jul 2004 06:48:08 +0000
Subject: note 43904 rejected from ref.curl by aidan
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-72861@lists.php.net to get a copy of this message
Note Submitter: wilhelm_thomas@yahoo.com ---- 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

« previous php.notes (#72861) next »