asoekaya
07-13-2008, 07:22 PM
Hello all..
i have a problem with this script...
when i try in localhost the script run goodly but when i upload it to internet my website crash.. i dont why this script not wrok on internet...
so pleease help me with this..
thanks,...
<?
if(ereg(basename (__FILE__), $_SERVER['PHP_SELF']))
{
header("HTTP/1.1 404 Not Found");
exit;
}
ob_start();
// user id masukkan disini, dipisahkan dengan koma
$id = array("mudies_05",
"mudy_dja04");
// gambar online dimasukkan disini sesuai dengan urutan ID diatas
$online = array("http://www.nofiyanti.info/images/kingon.png",
"http://www.nofiyanti.info/images/queenon.png");
// gambar offline dimasukkan disini sesuai dengan urutan ID diatas
$offline = array("http://www.nofiyanti.info/images/kingoff.png",
"http://www.nofiyanti.info/images/queenoff.png");
for($i=0;$i<count($id);$i++)
{
$buka = fopen("http://opi.yahoo.com/online?u=".$id[$i]."&m=t","r")
or die
("<a href='ymsgr:sendIM?".$id[$i]."'><img src='http://opi.yahoo.com/online?u=".$id[$i]."&m=g&t=11'/></a>");
while ($baca = fread( $buka, 2048 ))
{ $status .= $baca; }
fclose($buka);
if($status == $id[$i]." is ONLINE"){
echo "<div align='center'><a href='ymsgr:sendIM?".$id[$i]."'><img border=0 src='".$online[$i]."'/></a><br /><br /></div>";
} else {
echo "<div align='center'><a href='ymsgr:sendIM?".$id[$i]."'><img border=0 src='".$offline[$i]."'/></a><br /><br /></div>";
}
}
$out = ob_get_contents();
ob_end_clean();
?>
i have a problem with this script...
when i try in localhost the script run goodly but when i upload it to internet my website crash.. i dont why this script not wrok on internet...
so pleease help me with this..
thanks,...
<?
if(ereg(basename (__FILE__), $_SERVER['PHP_SELF']))
{
header("HTTP/1.1 404 Not Found");
exit;
}
ob_start();
// user id masukkan disini, dipisahkan dengan koma
$id = array("mudies_05",
"mudy_dja04");
// gambar online dimasukkan disini sesuai dengan urutan ID diatas
$online = array("http://www.nofiyanti.info/images/kingon.png",
"http://www.nofiyanti.info/images/queenon.png");
// gambar offline dimasukkan disini sesuai dengan urutan ID diatas
$offline = array("http://www.nofiyanti.info/images/kingoff.png",
"http://www.nofiyanti.info/images/queenoff.png");
for($i=0;$i<count($id);$i++)
{
$buka = fopen("http://opi.yahoo.com/online?u=".$id[$i]."&m=t","r")
or die
("<a href='ymsgr:sendIM?".$id[$i]."'><img src='http://opi.yahoo.com/online?u=".$id[$i]."&m=g&t=11'/></a>");
while ($baca = fread( $buka, 2048 ))
{ $status .= $baca; }
fclose($buka);
if($status == $id[$i]." is ONLINE"){
echo "<div align='center'><a href='ymsgr:sendIM?".$id[$i]."'><img border=0 src='".$online[$i]."'/></a><br /><br /></div>";
} else {
echo "<div align='center'><a href='ymsgr:sendIM?".$id[$i]."'><img border=0 src='".$offline[$i]."'/></a><br /><br /></div>";
}
}
$out = ob_get_contents();
ob_end_clean();
?>