وضعیت یاهو

amirlol

Well-Known Member
خیلی وقت بود اینو می خواستم !!!
همش با PHP بود
اینم کدش به زبون ASP

کد:
<HTML><HEAD></HEAD><body><%



strUser = "YourYahooUsername" 
Set SetOBJ = CreateObject("MSXML2.XMLHTTP") 
Call SetOBJ.Open("GET", "http://mail.opi.yahoo.com/online?u=" & strUser & "&m=t&t=0", false, "", "")
SetOBJ.Send
strOutput = UCase(SetOBJ.ResponseText)
If InStr(strOutput, "NOT ONLINE") > 0 Then
 strStatus = "OFFLINE"
 imgStatus = "<BR><IMG SRC='offline.gif' ALT='OFFLINE'>"
Else
 strStatus = "ONLINE"
 imgStatus = "<BR><IMG SRC='online.gif' ALT='ONLINE'>"
End If
Response.Write "Status : " & strUser & " Is " & strStatus & " " & imgStatus

%></body></html>
 

amirlol

Well-Known Member
اینم کد با php

اینم کد با php

کد:
<?php 

function get_web_content($website_address) { 
    $site_content=''; 
    $file_handle=fopen($website_address,"\r"); 
    if ($line=fgets($file_handle,1000)) 
    { 
        $site_content.=$line; 
    } 
     
    fclose ($file_handle); 
     
    return $site_content; 
} 

$website_address="http://opi.yahoo.com/online?u=amirlol&m=i&t=12"; 

$site_content=get_web_content($website_address); 



if($site_content=="00") 
echo "Not online ";
else if($site_content=="01") 
echo "online ";

?>
بجای amirlol آِ دی خودتونو بزارین

---
 

جدیدترین ارسال ها

بالا