How do I get a users ip in php?
Printable View
How do I get a users ip in php?
Then use the $ip variable for what ever you want to do.PHP Code:$ip = $_SERVER['REMOTE_ADDR'];
i want to php include on my website though? how do i make it into a file?
Lol, say i have index.php and I want to include a file say ip.php what do I put in the ip.php file to make it show on my index.php page?
Ive tryed that but dont work :S www.habboinfo.co.uk its jsut blank :S
thank you! works now +rep
Wow i thought everyone on this forum knew php :P
Php.net ftw
ip.php (Source):
INDEX.PHP SOURCE:PHP Code:<?php
echo $_SERVER['REMOTE_ADDR']
?>
(ADD TO IT)
PHP Code:<?php
include("ip.php");
Ruby ftw.
Liburd you definitely sound like the guy who coded habbo myspace...and a rare panel was it?