I have a php wordpress site that's running on IIS. I need to include, as part of that file, the response from a local ASP.NET page. PHP is reallly not my strongest language though.
The code I have is:
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $_SERVER['DOCUMENT_ROOT']+'/GetDesigns.ashx?type=1');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$localText = curl_exec($ch);
curl_close($ch);
echo $localText;
?>
Making a request to /GetDesigns.ashx?type=1 works from a browser and echos a string, but when the above code is used on the page, I get nothing.
Is there any way to do this or is it just me misusing PHP?