Jump to content


Photo

CURL.. odd issues with HTTPS/Direct Track?


  • Please log in to reply
No replies to this topic

#1 Joe826

Joe826
  • New Members
  • Pip
  • Newbie
  • 1 posts

Posted 12 August 2006 - 10:10 PM

I have a script which logs into my affiliate programs and downloads all the data, well Direct Track recently underwent an upgrade of some variety and I can't get my scripts to function anymore. I would really appreciate any help.

I can login to the website, and even manage my way to the stats request page, but when I attempt to download the stats (which is a simple GET request), it stalls. I'm really not sure what the deal is. Anyway here are a few snippets of code:

After i'm logged in, I go to the stats page. It works up to this point, and if I were to print the results, you'd see what you would expect to see:

// 3 - go to stats page

	$LOGINURL = "https://login.xxxxxx.com/partners/select_affiliate_stats.html";
	$reffer = "https://login.xxxxxx.com/partners/";

	$ch = curl_init(); 
  	curl_setopt($ch, CURLOPT_URL,$LOGINURL);
	curl_setopt($ch, CURLOPT_USERAGENT, $agent);
 	curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); 
	curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
	curl_setopt($ch, CURLOPT_REFERER, $reffer);
	curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
	curl_setopt($ch, CURLOPT_COOKIEFILE, $cookie_file_path);
	curl_setopt($ch, CURLOPT_COOKIEJAR, $cookie_file_path);
  	$result = curl_exec ($ch);

Now I try to grab some stats. This is where it just hangs. It acts like it's trying to download data from secure.xxxxxx.com, which as far as I can tell are images?

// 4 - go to stats page

	$LOGINURL = "https://login.xxxxxx.com/publishers/monthly_affiliate_stats.html?program_id=0&affiliate_stats_start_month=08&....";
	$reffer = "https://login.xxxxxx.com/partners/select_affiliate_stats.html";

	$ch = curl_init(); 
  	curl_setopt($ch, CURLOPT_URL,$LOGINURL);
	curl_setopt($ch, CURLOPT_USERAGENT, $agent);
 	curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); 
	curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
	curl_setopt($ch, CURLOPT_REFERER, $reffer);
	curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
	curl_setopt($ch, CURLOPT_COOKIEFILE, $cookie_file_path);
	curl_setopt($ch, CURLOPT_COOKIEJAR, $cookie_file_path);
  	$result = curl_exec ($ch);
	
	print $result;

Thanks!





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users