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 #173247 is a reply to message #173241] Tue, 29 March 2011 21:08 Go to previous messageGo to previous message
richard is currently offline  richard   
Messages: 213
Registered: June 2013
Karma:
Senior Member
On Tue, 29 Mar 2011 06:47:45 -0400, Beauregard T. Shagnasty wrote:

> 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.

while it may be correct, it serves no purpose.
Proper use of string manipulation will not confuse the server.
[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: Sun Nov 24 00:39:54 GMT 2024

Total time taken to generate the page: 0.04605 seconds