Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Share] php script menampilkan host ip kita
#1
nih biar gak sepi ane share script buatr menampilkan host ip kita, sapa tau ada manfaatnya


PHP Code:
$agen $_SERVER['HTTP_USER_AGENT'];
$headere = array ('Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
'Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7',
'Accept-Language: id,en-us;q=0.7,en;q=0.3');
$forwardFor $_SERVER["HTTP_X_FORWARDED_FOR"];
$fForwarded explode(', ' $forwardFor);
$Forwarded $fForwarded[0];
if(!empty(
$Forwarded)){
$ngendi $Forwarded;
}
else { 
$ngendi $_SERVER['REMOTE_ADDR']; }
$lookup 'http://aruljohn.com/track.pl?host='.$ngendi;
$ch curl_init();
curl_setopt ($chCURLOPT_URL$lookup);
curl_setopt ($chCURLOPT_HEADER0);
curl_setopt($chCURLOPT_TIMEOUT10);
curl_setopt($chCURLOPT_RETURNTRANSFER1);
curl_setopt ($chCURLOPT_AUTOREFERER1);
curl_setopt ($chCURLOPT_USERAGENT$agen);
curl_setopt($chCURLOPT_HTTPHEADER$headere);
$content curl_exec ($ch);
curl_close ($ch);
function 
potong($content,$start,$end){
if(
$content && $start && $end) {
$r explode($start$content);
if (isset(
$r[1])){
$r explode($end$r[1]);
return 
$r[0];
}
return 
'';
}
}
$str potong($content,'<table class="content-table">','</table>');

$livepotong($str,'Country</td><td>','<img');
$host=potong($str,'Hostname</td><td>','</td>');
if(
strstr($str,'')){$isppotong($str,'ISP</td><td>','');}
else{
$isppotong($str,'ISP</td><td>','</td>');}
$codepotong($str,'smallflags/','.gif');
$poster '';
if(!empty(
$live)) {
$poster .= $live.'^'.$code.'^';
}
if(!empty(
$isp)) {
$poster .= $isp;
echo 
$poster

silahkan di coba di xammp /appserv ato do hosting kalian, silahkan di kreasikan sesuai selera
Reply
#2
setelah dicoba ternyata berhasil,tinggal mengembangkan hehe ketawaaa
Reply
#3
Smile 
thanks gan,,,, :dodgy:
didi.manoso, proud to be a member of ForNesia Family since Mar 2014.
Reply
#4
keren bisa muncul benderanya juga..

kalo ane cuma tau yg begini doang..

<?php
$ip = $_SERVER['REMOTE_ADDR'];
echo $ip;
?>

kalo d'codeigniter palah cukup ke gini..

<?=$this->input->ip_address();=?>
Reply
#5
^Atas ane, ini juga bisa kok gan. punya agan langsung nampilin 'REMOTE_ADDR'
tapi untuk yg TS posting kayaknya sampai ke browser,dll
CMIIW malus:
Reply
#6
tergantung gimana ngembanginnya toh itu cuman modifikasi grabbing
Reply
  


Possibly Related Threads…
Thread Author Replies Views Last Post
  [Share] Webssh Script Gratis Buat Jualan SSH Van!shment 1 714 01-23-2019, 10:07 AM
Last Post: zeph
  [Share] php script speedtest ksatria 26 6,381 07-01-2016, 09:38 AM
Last Post: reiku