File_get_content error - php

I have tried hosting it on a VPS/web Host and some VPS it works my script and some it gives this error:
Warning:
file_get_contents(http://xip.xxxxx.org/xxxx/../aaaada23.php?user=rawr&host=127.0.0.1&port=3074&time=10&ip=127.0.0.1&power=1)
[function.file-get-contents]: 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:\xampp\htdocs\login\boot.php on line
163 Script bad error
Why do I get that error? Could it be DNS?

it means that the domain you're trying to reach is down, unreachable.
it could also mean that the networking/sockets are down on your machine.
Probably winsock error: http://msdn.microsoft.com/en-us/library/aa924071.aspx

Related

PHP file() - Failed to Open Stream: Connection timed out

I'm having a problem troubleshooting this issue about "failed to open stream: connection timed out". There is this application deployed in a server (ip.server.of.main.app). In some part of its code, it is posting data using this code:
$f = file('ip.server.of.another.app/tracker.php?var1=value1&var2=value2')
This ip.server.of.another.ap/tracker.php?var1=value1&var2=value2 is posting the data of the variables passed on the script.
But this line always timed out. In my local pc, when I run a test code containing that line, it didn't timed out and successfully posted the data on the database.
Is there any possible cause why it only timed out when run on the server of the main app?

AWS RDS php connection

I can't connect to MySQL RDS instance on AWS through php. It gave me this error:
Warning: mysqli::__construct(): (HY000/2002): 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:\xampp\htdocs\RESULTS\conne\New Text Document.php on line 7
Connection failed: 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.
Could you please help me to get through. I am new to AWS and stuff. So I would be much thankful if you could describe this issue in detail.
Is it possible that you do not have the ip address of the server hosting your php application whitelisted under your rds security group? Something like this: https://stackoverflow.com/a/21498471/6763406

PHP:Godaddy file_get_contents failed to open stream: Connection timed"

Since this morning I was able to do the line below and now only the one with the www.google.com will work I tried with others site www.ebay.com www.yahoo.com even www.godaddy.com and got the same error
I called GoDaddy support and they say they have no issue
this is the entire code
$feed = file_get_contents('http://www.yahoo.com'); //this doesn't work i get "failed to open stream: Connection timed" only works with google.com
This is the full error:
Warning: file_get_contents(http://www.yahoo.com) [function.file-get-contents]: failed to open stream: Connection timed out in /home/content/d/i/l/dilosolid/html/ebay/TextPHPXmlFileLoad.php on line 2

unable to connect to chat.facebook.com:5222 XMPP

I am making facebook chat api with xmpp. I have downloaded the code from http://developers.facebook.com/docs/chat/
But, I m getting error
Test platform connect for XMPP
access_token: <access_token_code>
server: chat.facebook.com
uid: 100002805874899
app id: 434781259869574
[INFO] Opening connection...
Warning: fsockopen() [function.fsockopen]: unable to connect to chat.facebook.com:5222 (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:\domains\telecomlijn.nl\wwwroot\wordpress\fbchat.php on line 52
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. (10060)
An error ocurred
Below is my code
please help me out to fix the bug and run the app successfully...

Unable to Connect error with Zend_Rest_Client on localhost

I am using Zend_Rest_Client to connect Zend_Rest_Server, everything seems to be alright, but when I try to get() from the server I recieve this error:
Zend_Http_Client_Adapter_Exception:
Unable to Connect to
tcp://localhost:80. Error #10060: 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:\www\zf_1_72\library\Zend\Http\Client\Adapter\Socket.php
on line 148
here is code, which I use
$client = new Zend_Rest_Client('http://localhost/my_application/api/index/');
$client->auth($key);
$result = $client->get();
thank's for any advice
This thread suggetss the issue may be with the 'localhost' name - try using 127.0.0.1 instead.

Categories