I feel this is silly but may look hi-tech to newbies on your forum !
Show them their ip adress.
Box heading : Your IP adress.(logged)
$hostname = gethostbyaddr($_SERVER['REMOTE_ADDR']);
echo $hostname;
Cool I love toys -- works good-- thank you ;D
Wouldnt work for me in a side block (Much too wide). What I did was make a file "image.php" with the code below in it.
<?php
$img_number = imagecreate(150,25);
$backcolor = imagecolorallocate($img_number,102,102,153);
$textcolor = imagecolorallocate($img_number,255,255,255);
imagefill($img_number,0,0,$backcolor);
$number = "$_SERVER[REMOTE_ADDR]";
Imagestring($img_number,10,5,5,$number,$textcolor);
header("Content-type: image/jpeg");
imagejpeg($img_number);
?>
And upload to my server. Then put the code below into a java/html block:
<img src="http://yoursite/image.php" border="1">
And, hey presto, the user's IP Addy.
Thanks for the code. O0
Thanks cool codes. :)
rofl, too bad its isp and not IP data
Here's the PHP code for showing the actual IP-address:
echo $_SERVER["REMOTE_ADDR"];
The one I posted in http://www.tinyportal.net/smf/index.php?topic=1910.msg15394#msg15394 can actuall be used in any site page.
Quote from: gerrymo on January 04, 2006, 12:37:46 PM
Wouldnt work for me in a side block (Much too wide). What I did was make a file "image.php" with the code below in it.
<?php
$img_number = imagecreate(150,25);
$backcolor = imagecolorallocate($img_number,102,102,153);
$textcolor = imagecolorallocate($img_number,255,255,255);
imagefill($img_number,0,0,$backcolor);
$number = "$_SERVER[REMOTE_ADDR]";
Imagestring($img_number,10,5,5,$number,$textcolor);
header("Content-type: image/jpeg");
imagejpeg($img_number);
?>
And upload to my server. Then put the code below into a java/html block:
<img src="http://yoursite/image.php" border="1">
And, hey presto, the user's IP Addy.
Now how would you add to that code so it would say something like....
Your Ip address:
255,255,255,200 <--- the actual IP address of course. ;D
Thanks for the code... It works in signatures too.. ;D
Easy enough. Just use html above it. Something like:
<p align="center">Your IP address:
<p align="center"><img src="http://yoursite/image.php" border="1">
</p>
How do I change the font?
Quote from: gerrymo on August 16, 2006, 09:51:04 AM
Easy enough. Just use html above it. Something like:
<p align="center">Your IP address:
<p align="center"><img src="http://yoursite/image.php" border="1">
</p>
I was hoping for a way to add it to the image... Is that possible ?
Quote from: Azraeliitti on August 15, 2006, 08:43:40 PM
Here's the PHP code for showing the actual IP-address:
echo $_SERVER["REMOTE_ADDR"];
Cool simple and easy ;p
You to open html box to the left are to the right .
You copy code.
<center><a href="http://www.wieistmeineip.de/cometo/?en"><img src="http://www.wieistmeineip.de/ip-address/" border="0" width="125" height="125" alt="IP" /></a></center>
I to see the your Ip_Adress.
tamasir~
nice one tamasir :up:
great job
Quote from: Aku on November 07, 2006, 12:03:12 AM
nice one tamasir :up:
great job
Aku! I Thank . ;)
Thanks: to Crip. :up:
I to see image, Crip by site. In the future I to create code.
:laugh: :laugh:
tamasir~
lol.. :D
Quote from: crip on November 07, 2006, 12:20:48 PM
lol.. :D
Crip Thank your so very much! :up: :D
tamasir~
Quote from: tamasir on November 06, 2006, 11:11:20 PM
You to open html box to the left are to the right .
You copy code.
<center><a href="http://www.wieistmeineip.de/cometo/?en"><img src="http://www.wieistmeineip.de/ip-address/" border="0" width="125" height="125" alt="IP" /></a></center>
I to see the your Ip_Adress.
tamasir~
RebelRoseIn html bloc you copy code. ;)
The code to construct image .
tamasir~
Thanks I got it now
Well I copied the exact code block of the code, and it seems that is does not work, all the block shows to me is the code. I have the most recent .9.8 portal and 1.1.3 SMF. What am I doing wrong......Also did is as a scriptbox, did I do that right?
Depends on which code you used mate :)
If you used this one:
<center><a href="http://www.wieistmeineip.de/cometo/?en"><img src="http://www.wieistmeineip.de/ip-address/" border="0" width="125" height="125" alt="IP" /></a></center>
That goes into an html block..
The other codes are for a php block :)
Good luck
Quote from: FERNSIDEâ,,¢ on December 12, 2007, 06:43:52 AM
A little tip, is when selecting a new block, choose a php or something. Add the code, and before you save it, change it to an html block..
Can you explain, why and how this is a useful tip?
Ooops, got it mixed up..
Was actually refering to when I have to edit it after.
I cannot do it while the block is in html, as the image is there instead.
My baad.. Deleted.