php3-list | 199908
Date: 08/24/99
- Next message: Marcos Pinto: "[PHP3] Error 9 in mySQL"
- Previous message: Evan Desai: "[PHP3] Aggregate query problems, etc."
- In reply to: Peter Sorger: "Re: [PHP3] - post & redirect"
- Next in thread: php3 <email protected>: "[PHP3] phpLib and forms"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Ahh, ok, if you want to fore a browser to post the scripts (Under Microsoft or
Unix ?)
Under microsoft,
You can control Netscape or Explorer from another program, I only did it for
netscape using VB.
For unix.... try cron job..
Peter Sorger wrote:
> > > Some time ago, Jason Brooke has posted a code to pass variables to
> another
> > > page rather by POST method than the GET method
> > > the code was:
> > >
> > > $host="my.host.com";
> > > $mydata="k=$k";
> > > $sp=fsockopen($host,80);
> > > fputs($sp,"POST /index.php3 HTTP/1.1\n");
> > > fputs($sp,"Host: $host\n");
> > > fputs($sp,"Content-type: application/x-www-form-urlencoded\n");
> > > fputs($sp,"Content-length: ".strlen($mydata)."\n");
> > > fputs($sp,"Connection: close\n\n");
> > > fputs($sp,$mydata);
> > > fclose($sp);
> > >
> > > The problem is:
> > > When I post the variables like that, the only thing I do, is open a
> > > connection from php3 script to the other php3 script without getting any
> > > output. I tried to
> > >
> > > echo fgets($sp,1024)."<BR>";
> > >
>
> > Before using the fclose($sp); do this
> > while(!feof($sp)) {
> > $cresp .= fgets($sp,1024);
> > }
> > fclose($sp);
>
> no, this is not the main problem, i was just lazy to do a while loop (copy &
> paste is faster :)
>
> > >
> > > serveral times, but while the connection was between the two scripts, it
> did
> > > not detect my browser either I could not get to any cookies or even the
> > > "REAL" IP, it returned the IP address of the server, where was the
> script
> > > located.
> > >
>
> > I'm not sure what you're asking here for ?
>
> I don't want to open a connection to post some variables between two scripts
> (the one that opens the fsockopen on port 80 and the second, that is
> executed by this request), but I want to force the browser to POST the
> variables instead.
> If you still don't get the point, read the first mail again. Sorry, I cannot
> describe it better in english.
>
> Sorgo
>
> > >
> > > I need something that will let MY browser post the variables to the
> server.
> > >
> > > Anyone gets any idea ?
> > >
> > > --
> > > PHP 3 Mailing List <http://www.php.net/>
> > > To unsubscribe, send an empty message to php3-unsubscribe <email protected>
> > > To subscribe to the digest, e-mail: php3-digest-subscribe <email protected>
> > > To search the mailing list archive, go to:
> http://www.php.net/mailsearch.php3
> > > To contact the list administrators, e-mail: php-list-admin <email protected>
> >
-- PHP 3 Mailing List <http://www.php.net/> To unsubscribe, send an empty message to php3-unsubscribe <email protected> To subscribe to the digest, e-mail: php3-digest-subscribe <email protected> To search the mailing list archive, go to: http://www.php.net/mailsearch.php3 To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: Marcos Pinto: "[PHP3] Error 9 in mySQL"
- Previous message: Evan Desai: "[PHP3] Aggregate query problems, etc."
- In reply to: Peter Sorger: "Re: [PHP3] - post & redirect"
- Next in thread: php3 <email protected>: "[PHP3] phpLib and forms"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

