I need to retrieve a web content. I usually use wget but it’s giving me an “Internal Server Error” this time. I also tried using file_get_contents(), it works when I’m using MAMP installed in my Mac, but when I run it in our server, it’s not doing anything and prints no error message. Is there any other way to do this? Below are the code that I used.
<?php
echo "Retrieving Traffic Updates";
$source = file_get_contents('http://www4.honolulu.gov/hpdtraffic/MainPrograms/frmMain.asp?sSearch=All+Incidents&sSort=I_tTimeCreate');
echo $source;
?>
Thanks in advance!!
I don’t know how to reply to all of you so I just added it here. CURL WORKED PERFECTLY. Thanks a lot guys.
I just have to ask though why file_get_contents() won’t work even if it’s enabled in the php.ini?
You can use cURL: