...

View Full Version : Getting Warning while using file_get_contents() and get_meta_tags() from wampserver



Sandeep2010
05-26-2011, 05:18 PM
Hello

I have run into a problem. I have wampserver 2 installed on my notebook. When I am using file_get_contents() and get_meta_tags() functions in a script from localhost I am getting warnings like this:

failed to open stream: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. in C:\wamp\www\test.php on line 3

From the warning message I think there is some problem while connecting to other websites from wampserver. But the same code works just fine in my remote server.

I am connected to my college LAN and behind a proxy server which is set up by the college.

Any suggestions about this will be highly appreciated.

Thanks A Lot!

gvre
05-26-2011, 06:37 PM
Try to connect via proxy. Check stream_context_create (http://gr.php.net/manual/en/function.stream-context-create.php) for more details.

Sandeep2010
05-26-2011, 07:22 PM
Try to connect via proxy. Check stream_context_create (http://gr.php.net/manual/en/function.stream-context-create.php) for more details.

Hi

I visited the link and got the idea. It is working now. Thanks a lot!



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum