Re: [quote]RULES:
[li]Eveyone must know the General Forum [url=http://theftalk.com/misc.php?action=rules]RULES[/url][/li]
[li]must be active[/li]
[li]must be friendly[/li]
[li]spamming or flamming
wah hebat tu penemuannya,iya kadang2 gue juga liat tu...
BTW , belajar PHP lagi ni
[spoiler]<?
if(eregi(”Windows NT 5.1″, $_SERVER['HTTP_USER_AGENT'])){
$os = “Windows XP”;
}
elseif(eregi(”Windows NT 5.0″, $_SERVER['HTTP_USER_AGENT'])){
$os = “Windows 2000″;
}
elseif(eregi(”Windows NT 4″, $_SERVER['HTTP_USER_AGENT'])){
$os = “Windows NT 4.0″;
}
elseif(eregi(”Windows 9″, $_SERVER['HTTP_USER_AGENT'])){
$os = “Windows 9x”;
}
elseif(eregi(”Windows Me”, $_SERVER['HTTP_USER_AGENT'])){
$os = “Windows Me”;
}
elseif(eregi(”Linux”, $_SERVER['HTTP_USER_AGENT'])){
$os = “Linux”;
}
elseif(eregi(”Macintosh”, $_SERVER['HTTP_USER_AGENT'])){
$os = “Macintosh”;
}
else {
$os = “Other”;
}
echo “OS anda adalah : <b>$os</b><br>”;
?>[/spoiler] [spoiler]<?
if(eregi(”opera”, $_SERVER['HTTP_USER_AGENT'])){
$browser = “Opera”;
}
elseif(eregi(”msie”, $_SERVER['HTTP_USER_AGENT'])){
$browser = “Internet Explorer”;
}
elseif(eregi(”Konqueror”, $_SERVER['HTTP_USER_AGENT'])){
$browser = “Konqueror”;
}
elseif(eregi(”Firefox”, $_SERVER['HTTP_USER_AGENT'])){
$browser = “Firefox”;
}
elseif(eregi(”safari”, $_SERVER['HTTP_USER_AGENT'])){
$browser = “Safari”;
}
elseif(eregi(”netscape”, $_SERVER['HTTP_USER_AGENT'])){
$browser = “Netscape”;
}
elseif(eregi(”AOL”, $_SERVER['HTTP_USER_AGENT'])){
$browser = “AOL”;
}
else {
$browser = “Other”;
}
echo “Browser anda adalah : <b>$browser</b>”;
?>[/spoiler] [spoiler]<?php
if ($_SERVER["HTTP_X_FORWARDED_FOR"]) {
$httpvia = “”.$_SERVER["HTTP_VIA"].”";
$pisah = explode(” “, $httpvia);
$muncul = “$pisah[1]“;
echo “$muncul <br> “.$_SERVER['REMOTE_ADDR'].” <br> “.$_SERVER["HTTP_X_FORWARDED_FOR"].”";
}
else {
$hostname = gethostbyaddr($_SERVER['REMOTE_ADDR']);
echo “”.$_SERVER['REMOTE_ADDR'].” <br> ($hostname)”;
}
?>[/spoiler]