Is it possible to get IP of server where the script is running.
I used following code

echo $ip=$_SERVER['REMOTE_ADDR'];

But it outputing as "".
Is there any way to print IP ?

That will only work if running in (Fast)CGI. See the last entry in this thread.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.20 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.