PHP Abstract Podcast Episode 34: Streams Abstraction

Today’s special guest is Manuel Lemos. Manuel is from Portugal and currently lives in Brazil where he works full-time on PHPClasses.org that he created in 1999. Today, Manuel is going to talk to us about “Streams Abstraction” ...

How to Get and Show IP Address Using PHP and JavaScript Print E-mail
User Rating: / 9
PoorBest 
This small tutorial will help you in learning how to get and show IP Address using PHP and JavaScript.

To Show IP Address via PHP 

 <?
$remote_address = getenv("REMOTE_ADDR");
echo "Your IP address is $remote_address.";
$browser_type = getenv("HTTP_USER_AGENT");
echo "You are using $browser_type.";
?>

 

To show the IP Address via JavaScript 

 var ip= '<!--#echo var="REMOTE_ADDR"-->';
document.write("Your IP Address is :"+ip+" ");

 

 
< Prev   Next >

Who's Online

We have 3 guests and 19 members online
  • Snorneoppon
  • alisankuff
  • InjeseeCeds
  • sweniaUrgerge
  • Bofabefsabire
  • OpistMifsMime
  • Busahoopounny
  • injesselams
  • ArgugOdodoNer
  • Artelurce
  • Frepepith
  • FrieraBab
  • mafaldamonet
  • Accebyset
  • jaccibialt
  • AwararpDor
  • essefoleazose
  • Yuiliaho
  • meetmalika