note 50605 deleted from ref.curl by danbrown

From: Date: Sun, 17 May 2009 19:41:02 +0000
Subject: note 50605 deleted from ref.curl by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-155251@lists.php.net to get a copy of this message
Note Submitter: christian at webaxis dot com dot au ---- 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; }

« previous php.notes (#155251) next »