connection refused error

connection refused error

am 19.12.2007 06:30:59 von Chimanrao

I am getting a connection refused error for the following piece of
code

$errno = 0;
$errstr= "testt";
fsockopen("www.google.com", 80, $errno, $errstr, 300);
echo $errno;
echo $errstr;

what could be the reason?
I am running php 4.4.4

Chiman

Re: connection refused error

am 19.12.2007 06:48:41 von Steve

"Chimanrao" wrote in message
news:639df7ff-464b-4602-8d33-d5e371d2a7d3@s8g2000prg.googleg roups.com...
>I am getting a connection refused error for the following piece of
> code
>
> $errno = 0;
> $errstr= "testt";
> fsockopen("www.google.com", 80, $errno, $errstr, 300);
> echo $errno;
> echo $errstr;
>
> what could be the reason?

possibly that google is refusing your connection. :)

Re: connection refused error

am 19.12.2007 08:38:05 von Chimanrao

On Dec 19, 10:48 am, "Steve" wrote:
> "Chimanrao" wrote in message
>
> news:639df7ff-464b-4602-8d33-d5e371d2a7d3@s8g2000prg.googleg roups.com...
>
> >I am getting a connection refused error for the following piece of
> > code
>
> > $errno = 0;
> > $errstr= "testt";
> > fsockopen("www.google.com", 80, $errno, $errstr, 300);
> > echo $errno;
> > echo $errstr;
>
> > what could be the reason?
>
> possibly that google is refusing your connection. :)

This happens to any website, not only for google.

Re: connection refused error

am 19.12.2007 10:21:47 von Hendri Kurniawan

Chimanrao wrote:
> I am getting a connection refused error for the following piece of
> code
>
> $errno = 0;
> $errstr= "testt";
> fsockopen("www.google.com", 80, $errno, $errstr, 300);
> echo $errno;
> echo $errstr;
>
> what could be the reason?
> I am running php 4.4.4
>
> Chiman

fsockopen is disabled in your server.

Hendri

Re: connection refused error

am 19.12.2007 15:29:43 von Steve

"Chimanrao" wrote in message
news:1f8df29c-e578-48b1-b9f2-80eb998f489b@s19g2000prg.google groups.com...
> On Dec 19, 10:48 am, "Steve" wrote:
>> "Chimanrao" wrote in message
>>
>> news:639df7ff-464b-4602-8d33-d5e371d2a7d3@s8g2000prg.googleg roups.com...
>>
>> >I am getting a connection refused error for the following piece of
>> > code
>>
>> > $errno = 0;
>> > $errstr= "testt";
>> > fsockopen("www.google.com", 80, $errno, $errstr, 300);
>> > echo $errno;
>> > echo $errstr;
>>
>> > what could be the reason?
>>
>> possibly that google is refusing your connection. :)
>
> This happens to any website, not only for google.

i figured...i was just fun'n ya.

anyway, check your firewall first.