note 50855 added to ref.curl

From: Date: Fri, 11 Mar 2005 17:28:22 +0000
Subject: note 50855 added to ref.curl
Groups: php.notes 
Request: Send a blank email to php-notes+get-86256@lists.php.net to get a copy of this message
<?php $url = "http://www.example.com/login.asp"; $params = "loginPWD=password&loginUID=cURLBOT"; $user_agent = "cURL Bot v0.01 beta"; $ch = curl_init(); curl_setopt($ch, CURLOPT_POST,1); curl_setopt($ch, CURLOPT_POSTFIELDS,$params); curl_setopt($ch, CURLOPT_URL,$url); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2); curl_setopt($ch, CURLOPT_USERAGENT, $user_agent); curl_setopt($ch, CURLOPT_RETURNTRANSFER,1); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); curl_setopt($ch, CURLOPT_COOKIEJAR, '_cookiejar/cookiejar.txt'); curl_setopt($ch, CURLOPT_COOKIEFILE, '_cookiejar/cookiejar.txt'); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE); // this line makes it work under https $result=curl_exec ($ch); curl_close ($ch); ?> I am having problems on different servers. This script, and all curl scripts work perfectly well on "libcurl/7.11.1 OpenSSL/0.9.7d zlib/1.1.4" but not on "libcurl/7.12.0 OpenSSL/0.9.7a zlib/1.1.4". Is there anything I should know about this. The cURL site is pathetic for documentation. ---- Manual Page -- http://www.php.net/manual/en/ref.curl.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+50855 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+50855&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+50855&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+50855&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+50855&report=yes&reason=useless Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+50855&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+50855&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#86256) next »