[PHP] Re: [PHP-WIN] Print variables coming from a form not controled by me...

2001-03-14 Thread Dream

Hi Michael, 

Alos, when I run the page, it give me a parse error in line 22, that is:

while ( list ( $key, $val ) = each ( $HTTP_GET_VARS ) )

Any idea?

Here's the complete page

html
head
titleUntitled Document/title
meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"
/head

body bgcolor="#FF" text="#00"
?
function DumpHttpGetVars()
   {
  global $HTTP_GET_VARS;

  if( $HTTP_GET_VARS )
  {
 reset ( $HTTP_GET_VARS );
 while ( list ( $key, $val ) = each ( $HTTP_GET_VARS ) )
 {
echo "$key = $valbr\n";
if ( "array" == GetType( $val )  )
{
   while ( list ( $key_child, $val_child ) = each
 $HTTP_GET_VARS ) )
   {
  echo "|-- $key = $valbr\n";
   }
}
 }
  }
   }


?
p 
  ? echo $SERVER_ADDR; ?
/p
p 
  ? echo $REMOTE_ADDR; ?
/p
p
  ? echo $HTTP_USER_AGENT; ?
/p
/body
/html

""Michael Rudel"" [EMAIL PROTECTED] escribi en el mensaje 
news:002001c0aba9$4fc50ab0$[EMAIL PROTECTED]...
// Dumps out all HTTP_GET_VARS:
function DumpHttpGetVars()
{
   global $HTTP_GET_VARS;
 
   if( $HTTP_GET_VARS )
   {
  reset ( $HTTP_GET_VARS );
  while ( list ( $key, $val ) = each ( $HTTP_GET_VARS ) )
  {
 echo "$key = $valbr\n";
 if ( "array" == GetType( $val )  )
 {
while ( list ( $key_child, $val_child ) = each
  $HTTP_GET_VARS ) )
{
   echo "|-- $key = $valbr\n";
}
 }
  }
   }
}
 
 So you just call the function 'DumpHttpGetVars()'
 and all of them will be printed out.
 
 Greetinx,
   Mike
 
 Michael Rudel
 - Web-Development, Systemadministration -
 ___
 
 Suchtreffer AG
 Bleicherstrae 20
 D-78467 Konstanz
 Germany
 fon: +49-(0)7531-89207-17
 fax: +49-(0)7531-89207-13
 e-mail: mailto:[EMAIL PROTECTED]
 internet: http://www.suchtreffer.de
 ___
 
 
 
 -Original Message-
 From: Tom Mathews [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, March 13, 2001 10:38 AM
 Cc: PHP Windows lista
 Subject: Re: [PHP-WIN] Print variables coming from a form not controled
 by me...
 
 
 Anything in the querystring can be translated as a php variable.
 
 Say you have the string coming in as
 ...?result=1age=23...
 then in the called page/script, the querystring are already variables.
 eg $result will have the value 1, $age will have the value 23...
 
 Hope this is what you're after
 
 Tom
 Dream wrote:
 
  Any idea of how to get information from a form (not a form controlled by
 me,
  through GET method, i.e. info coming with the URL, like this
  http://www.xxx.com/xxx.cgi?result=1age=23name=john)  and print it
 through
  php v.3?
 
  I don't know how to get the info (coming from an outside form) and pass it
  throught the php3 variables..
 
  Thanks,
 
  marc
 
  --
  PHP Windows Mailing List (http://www.php.net/)
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  To contact the list administrators, e-mail: [EMAIL PROTECTED]
 
 
 
 -- 
 PHP Windows Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]
 



Re: [PHP] Grab and print user IP address

2001-03-13 Thread Dream

thanks!


""Jon Snell"" [EMAIL PROTECTED] escribió en el mensaje
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 These are normally already stored as variables in PHP for you.
 Run the phpinfo(); function and it will display a list of the current
 variables and values...

 -Original Message-
 From: Dream [mailto:[EMAIL PROTECTED]]
 Sent: Monday, March 12, 2001 4:00 AM
 To: [EMAIL PROTECTED]
 Subject: [PHP] Grab and print user IP address


 Hi!

 I need just a little script so I can get and print in browser the
currently
 users IP address and if possible, browser type, etc.

 Thanks a lot!

 marc




 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]



 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Grab and print user IP address

2001-03-12 Thread Dream

Hi!

I need just a little script so I can get and print in browser the currently
users IP address and if possible, browser type, etc.

Thanks a lot!

marc




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Grab and print user IP address

2001-03-12 Thread Dream

Thanks, michi

Just a question, what means the tag PRE?

thanks!
marc

[EMAIL PROTECTED] escribió en el mensaje
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
  Hi!
 
  I need just a little script so I can get and print in browser the
  currently
  users IP address and if possible, browser type, etc.

 html
 body
 pre
 ?
   echo "Your IP-Address: $HTTP_SERVER_VARS[REMOTE_ADDR]\n";
   echo "Your Browser   : $HTTP_SERVER_VARS[HTTP_USER_AGENT]\n";
 ?
 /pre
 /body
 /html

 HTH
 michi

 --
 Sent through GMX FreeMail - http://www.gmx.net

 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]