Kamis, 03 Mei 2012

Menampilkan status Yahoo messenger di web /blog

Sobat ingin mantengin status Yahoo Messenger (YM)  ke web atau blog sobat? Nah ini dia yang sobat cari : Langsung kesasaran kawan.....!!!!!

Copy kode berikut :


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body>
<?php

//set konfigurasi awal
$id = "contoh@ymail.com"; //Ubah sesuai Yahoo ID anda
$online = "images/ymonline.jpg"; //URL ke gambar jika status online
$offline = "images/ymoffline.png"; //URL ke gambar jika status offline

//Mari membaca Yahoo :D ,
$buka = fopen("http://opi.yahoo.com/online?u=".$id."&m=t","r")
or die
("<img src='http://opi.yahoo.com/online?u=".$id."&m=g&t=2'/>");
while ($baca = fread( $buka, 2048 ))
{ $status .= $baca; }
fclose($buka);

if($status == $id." is ONLINE"){
echo "<img border=0 src='".$online."'/>";
} else {
echo "<img border=0 src='".$offline."'/>";
}
?>
</body>
</html>

OK ! Rebes kawan...!!! Selamat mencoba...hehehe...
 
Ke atas