The issue is that they switched TIMS data over to a secure site, and PHP lacked any SSL support until 4.3.0, and ever since it has been rather flaky. As an alternative without fooling with any libraries, you may be able to use fsockopen() to create a SSL or TLS socket. More than likely your host has heavy restrictions on socket-related functions, especially if you are on a shared hosting plan.
When they made the switch last season, I immediately updated my scripts to utilize the cURL library, which works beautifully in this situation. Many hosts now support it and I definitely recommend going this route.
Here would be a simple cURL replacement for file_get_contents():
Code:
<?php
$ch = curl_init();
$timeout = 5; // set to zero for no timeout
curl_setopt ($ch, CURLOPT_URL, 'http://example.com');
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt ($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
$file_contents = curl_exec($ch);
curl_close($ch);
// display file
echo $file_contents;
?>
and a replacement for file():
Code:
<?php
$ch = curl_init();
$timeout = 5; // set to zero for no timeout
curl_setopt ($ch, CURLOPT_URL, 'http://example.com');
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt ($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
$file_contents = curl_exec($ch);
curl_close($ch);
$lines = array();
$lines = explode("\n", $file_contents);
// display file line by line
foreach($lines as $line_num => $line) {
echo "Line # {$line_num} : ".htmlspecialchars($line)."<br />\n";
}
?>
If you are unable to use these methods and can not get anything to work, I am more than willing to help out.
Hope this helps!