I've been puzzling over this for a few days now, and the Siteground L2 support isn't willing to help out here.
I'm coding a Wordpress plugin to get affiliate tracking links from Tune/HasOffers. This is totally acceptable behavior AFAIK, and all I have to do is call a URL, and I'll be redirected to a landing page with whatever parm values I've specified.
I have a development Linode, where this script works as expected. You can see the output here: http://new.burtlo.info/wp-content/plugins/lmpostback/test.php
I've installed that same script on Siteground, but I get a zero length response: http://launchmoxie.com/wp-content/plugins/lmpostback/test.php
I've tried a number of variations on making the call, and have tried a number of curl options as well. I'm still stuck.
Any suggestions? Thanks in advance.
Here's the code:
<?php
$aff_link = 'http://jump.launchmoxie.com/aff_c?offer_id=26&aff_id=793';
// create a new cURL resource
$ch = curl_init();
// set URL and other appropriate options
curl_setopt($ch, CURLOPT_URL, $aff_link);
curl_setopt($ch, CURLOPT_HEADER, true);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, false);
// grab URL and pass it to the browser
$response = curl_exec($ch);
print_r ($response);
echo 'strlen of response = ' . strlen($response);
// close cURL resource, and free up system resources
curl_close($ch);
?>