I have a very simple PHP script pasted below. Basically it opens a site and displays the contents on the screen. No parsing or other processing is required. Generally it works fine however I was having trouble with one particular site www.pinnaclesports.com. My suspicion is the site has some sort of "protection" e.g. it is looking for specific headers that my code is not supplying. Has anyone encountered this before and are there any workarounds?
thanks,
Don
<?php
$url = "http://www.pinnaclesports.com";
$ch = curl_init(); // initialize curl handle
curl_setopt($ch, CURLOPT_URL,$url); // set url
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);// allow redirects
$result = curl_exec($ch); // run the whole process
curl_close($ch);
echo $result;
?>