View Full Version : .PHP
Luckyrare
21-03-2005, 09:04 PM
Okay.
To show a the persons IP adress you use this code...
<? echo "IP: $REMOTE_ADDR"; ?>
But I would like it to come out as Veranda + Bold.
How do I Do what with out damaging the script?
iRoss
21-03-2005, 09:08 PM
<html>
<head>
</head>
<body>
<font size="1" face="Verdana">
<? echo "IP: $REMOTE_ADDR"; ?></font>
</body>
</html>
there you go
Mentor
21-03-2005, 09:11 PM
thats one of the plus's of php you can just jamm it in with regular html :D
athogh your script for the ip is wrong
<?php echo ($_SERVER['REMOTE_ADDR']);?>
would be what you want. Unless you are asigning that to the varible $REMOTE_ADDR already
aka
$REMOTE_ADDR = $_SERVER['REMOTE_ADDR'];
ps. For blold as well
<b><font size="1" face="Verdana"><? echo "IP: $REMOTE_ADDR"; ?></font></b>
or
<b><font size="1" face="Verdana"><?php echo ($_SERVER['REMOTE_ADDR']);?></font></b>
Luckyrare
21-03-2005, 09:17 PM
Okay. So for there browser to show its...
<html>
<head>
</head>
<body>
<font size="1" face="Verdana">
<?php echo $_SERVER['HTTP_USER_AGENT']; ?></font>
</body>
</html>
Mentor
21-03-2005, 09:19 PM
Okay. So for there browser to show its...
if its a php page. the php will have be phased to show whoevers veiwing the pages ip adress
so for exsmaple it may look like
<html>
<head>
</head>
<body>
<font size="1" face="Verdana">00.00.000.00 </font>
</body>
</html>
but what you said is what you may wnat to put on your actal page in the programing veiw.
Luckyrare
21-03-2005, 09:22 PM
Iam going to put the script in a iframe. That should work?
Mentor
21-03-2005, 09:24 PM
yea. ifraim will make no differnce, ifraims are loaded in the same way, exwpet there displayed inside anotehr page :D
Luckyrare
21-03-2005, 09:25 PM
Yeah xD
Do you no how to password protect a page for viewing?
Mentor
21-03-2005, 09:30 PM
can be done simply and complex. with php the main ways would itehr be using sessions, or easyer cookies. then creat a falt file database of uses. and a loggin page.
if you have cpanle you can also secure a floder via that which is helpful.
id be happy to help more, but i g2g.
iRoss
21-03-2005, 09:48 PM
make sure u name the page
pagename.php or it wont work make sure it has .php on the end instead of .htm on .html etc etc
Want to hide these adverts? Register an account for free!
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.