Mengganti gambar / status online yahoo messenger


Mengganti gambar / status online yahoo messenger

Berikut langkah-langkah untuk mengganti gambar status online pada yahoo messenger.
1. Buatlah dua gambar. Yang pertama untuk menunjukkan status “Online” dan yang kedua untuk menunjukkan status “Offline”.
2. Copy script berikut

<?php

//set konfigurasi awal
$id = “yahoo_id_anda”; //Ubah sesuai Yahoo ID anda
$online = “http://domainanda/image.”; //URL ke gambar jika status online
$offline = “http://domainanda/image.”; //URL ke gambar jika status offline

//Mari membaca Yahoo ,
$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.”‘/>”;
}
?>

Note:
disarankan simpan di file baru. misal ym.php kemudian panggil dengan fungsi include. misal : <?php include “ym.php”; ?>

Iklan

Tinggalkan Balasan

Please log in using one of these methods to post your comment:

Logo WordPress.com

You are commenting using your WordPress.com account. Logout / Ubah )

Gambar Twitter

You are commenting using your Twitter account. Logout / Ubah )

Foto Facebook

You are commenting using your Facebook account. Logout / Ubah )

Foto Google+

You are commenting using your Google+ account. Logout / Ubah )

Connecting to %s