HELP!! QUERY_STRING

From: Date: Sat, 11 Aug 2001 02:00:09 +0000
Subject: HELP!! QUERY_STRING
Groups: php.general 
Request: Send a blank email to php-general+get-62238@lists.php.net to get a copy of this message
the things i want it to do are: when i go to index.php?172.0.0.1:5500 that it would change the $ipname to 172.0.0.1 and $portNum to 5500 and if i go to index.php?172.0.0.1 then $ipname to 172.0.0.1 and $portNum to 5500 so if i would go to: index.php?255.255.255.255 $ipname to 255.255.255.255 and $portNum to 5500 ok.. i think i know 50% of the solution of this problem: if $portNum eq'' $portNum "5500"; else } is that right or i that cgi or is that totally wrong? right now this is my code: (index.php) #################################### <? #First output the HTML page ?> <? #Some functions if (! $sock = fsockopen($ipname, $portNum, &$num, &$error, 5)) print ("<IMG SRC=\"http://hlpass.macomega.com/red.jpg\" WIDTH=10 HEIGHT=10>"); else{ print ("<IMG SRC=\"http://hlpass.macomega.com/green.jpg\" WIDTH=10 HEIGHT=10>"); fclose($sock); } #If the form has been posted, process the query, otherwise there's #nothing to do yet if(!$queryType) exit; #Make sure the target appears valid if( (!$ipname) || (!eregi("\.",$ipname)) ){ message("Error: You did not specify a valid target host or IP."); exit; } #Figure out which tasks to perform, and do them if( ($queryType=="all") || ($queryType=="checkp") ) checkp($ipname,$portNum); ?> ####################################

« previous php.general (#62238) next »