Yahoo Online Status Checker Script in PHP

13 Apr

Today,I will provide small piece of PHP snippet for checking yahoo online status.

Full Source Code:

<html>
<head>
<title>Yahoo Status</title>
</head>
<body>
<form action="" method="post">
<input type="text" name="yid">
<input type="submit" name="submit" value="Check Status">
</form>
<?php
if (isset($_POST['submit']))
{
$yid = $_POST['yid'];
$yid=explode("@",$yid);
$status = file_get_contents("http://mail.opi.yahoo.com/online?u=$yid[0]&m=a&t=1");
if ($status == 00)
{
echo "You're Offline";
}
elseif ($status == 01)
{
echo "You're Online";
}
else
{
echo "There is some issue.";
}
}
?>
</body>
</html>
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s