FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » ip address of client
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: ip address of client [message #173241 is a reply to message #173237] Tue, 29 March 2011 10:47 Go to previous messageGo to previous message
Beauregard T. Shagnas is currently offline  Beauregard T. Shagnas
Messages: 154
Registered: September 2010
Karma:
Senior Member
richard the sto0pid wrote:

> On Mon, 28 Mar 2011 22:46:48 -0700 (PDT), suresh wrote:
>
>> Hi
>> I was using the following script to get ip address of client, but I
>> get Welcom ::1 from the following script. How to get the real ip
>> address?
>>
>> <?php
>> [snip code to only what RtS is replying to]
>> echo "Welcome "; echo $ip;
>
> echo "welcome " $ip; <--- wrong
> echo "welcome ".$ip; <--- will work, as is concatenated
>
> only one echo per physical line.

Incorrect and not necessary. His line: echo "Welcome "; echo $ip;
is perfectly legitimate, having the proper terminator ";" after the
first echo. A newline is not required between commands.

--
-bts
-In a broadband world, you are just a dialup
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Very strange behaviour of imageftbbox()?
Next Topic: CLP - ON TOPIC! - Need PHP form email help, Please!
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Wed Nov 27 18:22:45 GMT 2024

Total time taken to generate the page: 0.04851 seconds