You are here: Re: redirection based on not connecting to url (fsockopen) « PHP Programming Language « IT news, forums, messages
Re: redirection based on not connecting to url (fsockopen)

Posted by webbyfoot on 11/26/26 11:56

webbyfoot@gmail.com wrote:
> >
> > Hi John,
> >
> > Have you tried suppressing the error returned by fsockopen using the
> > '@' op?
> > See http://www.php.net/manual/en/language.operators.errorcontrol.php
> > for details.
> >
> > Carl.
>
> Hi Carl, yes I did - but that seemed to suppress the result too - no
> errors - but no redirection either :-(
>
> I also tried the ob thing to cache the warning headers but that again
> resulted in nothing happening at all
>
> John

Doh! Silly me - I finally read the manual as Carl suggested and
realised my @ was in the wrong place - I'd put it at the front of the
line instead of infront of the function. It's now:

$fp = @fsockopen($HTTP_POST_VARS['url'],80, $errno, $errstr, 30);
if(!$fp) {
header("Location: index2.php");exit;
}

And works! Thanks!! :-)

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация