Hi,
Need the group's help.
I am running an intranet website within my company's firewall and proxy servers. I tried to get newsfeed from a newspaper's website and trim it to get the headlines of the day. Here's the php code snippet:
$file = fopen("http://www.emedia.com.my/Current_News/BH/bhindex", "r");
$grab = eregi("<img src=\"/images/bh/bhutama.gif\" border=\"0\">(.*)></td>\n\n<td valign=\"top\" width=164>", $rf, $printing);
Problem is I got nothing but php warnings:
Warning: php_network_getaddresses: gethostbyname failed in c:\websites\submits\newsfeed.php on line 20
Warning: fopen("http://www.emedia.com.my/Current_News/BH/bhindex", "r") - No error in c:\websites\submits\newsfeed.php on line 20
Fatal error: Maximum execution time of 30 seconds exceeded in c:\websites\submits\newsfeed.php on line 20
Is it something to do with apache's httpd.conf setting or php.ini or the company's proxy to allow me to read off an external URL's file?
Appreciate whatever response that helps.
Thanks.