omid1991
March 11th, 2014, 19:51
<?php
$ID = "omid_boys2010"; // ای دی یاهو شما
$lines = @file ("http://opi.yahoo.com/online?u=".$ID."&m=t");
$te = "salam az ghasedak-namin.ir pm midam"; // متن پیام شما
$pic_on = "http://ghasedak-namin.ir/images/on.png"; // آدرس عکس در وضعیت آنلاین
$pic_off = "http://ghasedak-namin.ir/images/off.png"; // آدرس عکس در وضعیت آفلاین
if ($lines ==true)
{
$response = implode("", $lines);
if (strpos ($response, "NOT ONLINE") ==true)
{
echo '<a rel="nofollow" target="_self" href="ymsgr:sendim?'.$ID.'=&m='.$te.'"><img border="0" alt="آفلاین" src="'.$pic_off.'"></img></a>';
}
elseif (strpos ($response, "ONLINE") == true)
{
echo '<a rel="nofollow" target="_self" href="ymsgr:sendim?'.$ID.'=&m='.$te.'"><img border="0" alt="آنلاین" src="'.$pic_on.'"></img></a>';
}
}
?>
منبع : انجمن ایران پی اچ پی
(http://forum.iranphp.org)ویرایش و توسعه خودم :65:
$ID = "omid_boys2010"; // ای دی یاهو شما
$lines = @file ("http://opi.yahoo.com/online?u=".$ID."&m=t");
$te = "salam az ghasedak-namin.ir pm midam"; // متن پیام شما
$pic_on = "http://ghasedak-namin.ir/images/on.png"; // آدرس عکس در وضعیت آنلاین
$pic_off = "http://ghasedak-namin.ir/images/off.png"; // آدرس عکس در وضعیت آفلاین
if ($lines ==true)
{
$response = implode("", $lines);
if (strpos ($response, "NOT ONLINE") ==true)
{
echo '<a rel="nofollow" target="_self" href="ymsgr:sendim?'.$ID.'=&m='.$te.'"><img border="0" alt="آفلاین" src="'.$pic_off.'"></img></a>';
}
elseif (strpos ($response, "ONLINE") == true)
{
echo '<a rel="nofollow" target="_self" href="ymsgr:sendim?'.$ID.'=&m='.$te.'"><img border="0" alt="آنلاین" src="'.$pic_on.'"></img></a>';
}
}
?>
منبع : انجمن ایران پی اچ پی
(http://forum.iranphp.org)ویرایش و توسعه خودم :65: