im trying to use fopen to display a page of movie listings. This is the exact link of the page im trying to display.
http://www.hollywood.com/showtimes/search.asp?geosearch=97007
here is my code so far. . .
<?
$handle = fopen ("http://www.hollywood.com/showtimes/search.asp?geosearch=97007", "r");
$contents = fread($handle, 1000000);
fclose ($handle);
print ($contents);
?>
Am I missing something or do I need to add something. I tried changing the link to a txt file i have on my server (ex. http://www.domain.com/file.txt) and it worked fine and displayed the text file. But for some reason when I use that link it isn't working. This is the errors I am getting.
Warning: fopen(http://www.hollywood.com/showtimes/search.asp?geosearch=97007): failed to open stream: HTTP request failed! HTTP/1.1 500 Internal Server Error in /public_html/movietest.php on line 2
Warning: fread(): supplied argument is not a valid stream resource in /public_html/movietest.php on line 3
Warning: fclose(): supplied argument is not a valid stream resource in /public_html/movietest.php on line 4
Thanks in advance for any help.