Delfer has asked for the wisdom of the Perl Monks concerning the following question:
I want the "sth1&sth2".
MY SCRIPT:
But result is "Querystring is:" only!#!/usr/local/bin/perl use strict; use Socket; use FileHandle; my $port = 11111; my $xxx=$ENV{"QUERY_STRING"}; socket(SOCKET, PF_INET, SOCK_STREAM, (getprotobyname('tcp'))[2]); bind (SOCKET, pack('Sna4x8', AF_INET, $port, "\0\0\0\0")); listen(SOCKET, 3); NEW_SOCKET->autoflush(); SOCKET->autoflush(); while (1) { accept(NEW_SOCKET, SOCKET); my $pid; if (! ($pid = fork)) { select(NEW_SOCKET); print "Port 11111 is available on my server"; print "Querystring is: <br>$xxx</br>"; close NEW_SOCKET; exit; } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Easy!
by chromatic (Archbishop) on Feb 05, 2000 at 08:01 UTC | |
|
Re: How do I get QUERY_STRING when I use sockets?
by stephen (Priest) on Feb 05, 2000 at 04:44 UTC | |
|
Re: How do I get QUERY_STRING when I use sockets?
by Anonymous Monk on Feb 05, 2000 at 04:30 UTC |