Re: fsockopen to spit out the HTTP's Location...
| From: | Scott Fletcher | Date: | Tue, 23 Mar 2004 18:10:21 +0000 |
| Subject: | Re: fsockopen to spit out the HTTP's Location... | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-181294@lists.php.net to get a copy of this message | ||
See the reply to the Chris Shiflett's reply...
"Michal Migurski" <mike@saturn5.com> wrote in message
news:Pine.GSO.4.52.0403230902100.15116@atari...
> >In plain english, can't use the header("Location: ****"), so have to use
> >the fsockopen() instead. Just that header() is not allowed, don't ask me
> >why. Just couldn't get the browser perform the HTTP LOCATION event.
> >--snip--
> >$host = "192.168.0.2";
> >$port = 443;
> >$url_str = "ssl://www.whatever.com?str1=true&str2=false&str3=true";
> >
> >$fp = fsockopen("ssl://".$host, $port, $errno, $errstr, $timeout = 30);
> >--snip--
> > //send out to the browser.....
> > fputs($fp, "Location: ".$url_str."\r\n");
>
> That won't get sent to the browser, it will get sent to 192.168.0.2, which
> is (I guess) some machine behind your router. You can't initiate a TCP
> connection -- what fsockopen does -- with the client's machine.
>
> I'll ask even though you said not to - Why doesn't header() work?
>
> ---------------------------------------------------------------------
> michal migurski- contact info and pgp key:
> sf/ca http://mike.teczno.com/contact.html