note 50605 added to ref.curl

From: Date: Fri, 04 Mar 2005 14:38:43 +0000
Subject: note 50605 added to ref.curl
Groups: php.notes 
Request: Send a blank email to php-notes+get-85921@lists.php.net to get a copy of this message
I use CURL to get history of e-gold payment. function get_history($egold, $pass, $batch, $counter, $s_date, $s_month, $s_year, $e_date, $e_month, $e_year, $type){ $defined_vars = get_defined_vars(); $_url = 'https://www.e-gold.com/acct/historycsv.asp'; $params = "AccountID=$egold&PassPhrase=$pass&" . "startmonth=".$s_month."&startday=". $s_date."&startyear=".$s_year."&" . "endmonth=".$e_month."&endday=". $e_date."&endyear=".$e_year."&"; if($type == "0"){ $params .= "paymentsmade=1&"; } if($type == "1"){ $params .= "paymentsreceived=1&"; } if(!empty($batch)){ $params .= "batchfilter=$batch&"; } if(!empty($counter)){ $params .= "counterfilter=$counter&"; } $params .= "metalfilter=1&"; $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, $defined_vars['HTTP_USER_AGENT']); curl_setopt($ch, CURLOPT_RETURNTRANSFER,1); $content = curl_exec ($ch); curl_close ($ch); return $content; } ---- Manual Page -- http://www.php.net/manual/en/ref.curl.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+50605 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+50605&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+50605&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+50605&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+50605&report=yes&reason=useless Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+50605&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+50605&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#85921) next »