Predefined Variables

Fred Atkinson fatkinson at mishmash.com
Sun Aug 2 05:07:21 CEST 2009


On Sat, 01 Aug 2009 18:56:33 -0700, Fred Atkinson
<fatkinson at mishmash.com> wrote:

>On Thu, 23 Jul 2009 15:28:50 +0200, "Diez B. Roggisch"
><deets at nospam.web.de> wrote:
>
>>Fred Atkinson wrote:
>>
>>> Is there a pre-defined variable that returns the GET line
>>> (http://www.php.net/index.php?everythingafterthequestionmark) as a
>>> single variable (rather than individual variables)?
>>
>>Variables don't return things. Functions do. And additionally the answer
>>depends on what and with what you actually do.
>>
>>Diez
>
>	I want to display the client browser's IP address on the Web
>page.  
>
>	I'd like to create a variable like this: ip = somefunction(). 
>	Then I can print the IP address on the Web page and/or log it
>in an error file.  
>
>
>
>					Fred 

I replied to the wrong post.  

Sorry.  

     I want to do something like this: 

            string = os.environment('QUERY_STRING')

    If this is the string in the URL:
http://www.someurl.com/cgi-bin/somescript.cgi?anythingafterthequestionmark
   'string' should now contain the value
'everythingafterthequestionmark'

   When I use the os.environment('QUERY_STRING'), it doesn't work.  

   Is there something I should import to make this function work?  Or
what else is wrong?  



					Fred 



More information about the Python-list mailing list