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>

Leave a comment