Jump to content

CURL.. odd issues with HTTPS/Direct Track?


Joe826

Recommended Posts

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:

[code]// 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);[/code]

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?

[code]// 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;[/code]

Thanks!
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.