Login   Register  
PHP Classes
elePHPant
Icontem

File: sample.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Alfredo Sanchez  >  Yahoo  >  sample.php  >  Download  
File: sample.php
Role: Example script
Content type: text/plain
Description: Sample file that display yahoo id online status
Class: Yahoo
Check the online status of an Yahoo messenger user
Author: By
Last change: added comments to the sample script
Date: 5 years ago
Size: 397 bytes
 

Contents

Class file image Download
<?php
// class file needed
include 'class.yahoo.php';

// create an instance of the yahoo class
$ys = new Yahoo();

// assign a yahoo id to check
$id 'ernmats';

// get the online status of the yahoo id
$status $ys->Get_status($id);

// display the current status of the yahoo id
if ($status == false)
    echo 
"$id is offline";
elseif(
$status == true)
    echo 
"$id is online";
?>