![]() |
![]() |
![]()
Post
#1
|
|
Grupa: Zarejestrowani Postów: 12 Pomógł: 0 Dołączył: 24.08.2008 Ostrzeżenie: (0%) ![]() ![]() |
Witam
mam do was takie pytanie jak mam przerobic kod php statow tak aby skrypt wyswietlal mi dane zawarte w AIM a w ICQ nie a bardzo mi to potrzebne podajcie gotowy stat do tej pory zrobilem Tutaj kliknij lecz pole iceq nie jest odczytywane prosze o pomoc ![]() oto kod php : Kod <body style="background-color: transparent" text="#FF0000"> <LINK rel="stylesheet" href="style.css" type="text/css"> <center> <? $sc[czas] = 180; $sc[host] = "sc1.readycast.org"; $sc[port] = 8018; $sc[template] = "<b> [gg]</b>"; $sc[template3] = "<b> [gg1]</b>"; $sc[template2] = "<b> [ile]</b>"; ?> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-2"> <META HTTP-EQUIV="Refresh" CONTENT="<?=$sc[czas]?>; URL=""> </head> <body topmargin="0" leftmargin="0" background="biel.gif" text="#FF0000"> <font color="black" face="arail" size="2"> <? if($fp = fsockopen($sc[host], $sc[port])) { fputs($fp,"GET /index.html HTTP/1.0\r\nUser-Agent: XML Getter (Mozilla Compatible)\r\n\r\n"); fgets($fp);fgets($fp);fgets($fp); while(!feof($fp)) $in.=strip_tags(fgets($fp)); fclose($fp); # echo $in; // [status] $m[0]="Server is currently"; $m[1]=""; $mp[0]=strpos($in,$m[0]); $mp[1]=@strpos($in,$m[1]); $ml[0]=strlen($m[0]); $ml[1]=strlen($m[1]); $tmp[1]=explode( " " , trim( substr( $in , $mp[0] + $ml[0] , 5 ) ) ); if( $tmp[1][0] == "up" ) $dat[status] = "on"; elseif( $tmp[1][0] == "down" ) $dat[status] = "off"; else $dat[status] = "err"; if($dat[status]=="on") { // [dj] $m[0]="Stream Title:"; $m[1]="Content Type:"; $mp[0]=strpos($in,$m[0]); $mp[1]=strpos($in,$m[1]); $ml[0]=strlen($m[0]); $ml[1]=strlen($m[1]); $tmp[1]=trim( substr( $in , $mp[0] + $ml[0] , $mp[1]-$mp[0]-$ml[1] ) ); if( $tmp[1] ) $dat[dj] = $tmp[1]; else $dat[dj] = "err"; // [gg] $m[0]="Stream AIM:"; $m[1]="Stream IRC:"; $mp[0]=strpos($in,$m[0]); $mp[1]=strpos($in,$m[1]); $ml[0]=strlen($m[0]); $ml[1]=strlen($m[1]); $tmp[1]=trim( substr( $in , $mp[0] + $ml[0] , $mp[1]-$mp[0]-$ml[1] ) ); if( $tmp[1] ) $dat[gg] = $tmp[1]; else $dat[gg] = "err"; // [gg1] $m[0]="Stream AIM:"; $m[1]="Stream IRC:"; $mp[0]=strpos($in,$m[0]); $mp[1]=strpos($in,$m[1]); $ml[0]=strlen($m[0]); $ml[1]=strlen($m[0]); $tmp[1]=trim( substr( $in , $mp[0] + $ml[0] , $mp[1]-$mp[0]-$ml[1] ) ); if( $tmp[1] ) $dat[gg1] = $tmp[1]; else $dat[gg1] = "err"; // [genre] $m[0]="Stream Genre:"; $m[1]="Stream URL:"; $mp[0]=strpos($in,$m[0]); $mp[1]=strpos($in,$m[1]); $ml[0]=strlen($m[0]); $ml[1]=strlen($m[1]); $tmp[1]=trim( substr( $in , $mp[0] + $ml[0] , $mp[1]-$mp[0]-$ml[1]-2 ) ); if( $tmp[1] ) $dat[genre] = $tmp[1]; else $dat[genre] = "err"; // [ile] $m[0]="kbps with"; $m[1]="listeners"; $mp[0]=strpos($in,$m[0]); $mp[1]=strpos($in,$m[1]); $ml[0]=strlen($m[0]); $ml[1]=strlen($m[1]); $tmp[1]=explode( " " , trim( substr( $in , $mp[0] + $ml[0] , $mp[1]-$mp[0]-$ml[1]-2 ) ) ); if( $tmp[1] ) $dat[ile] = $tmp[1][0]; else $dat[ile] = "err"; // [max] $m[0]="kbps with"; $m[1]="listeners"; $mp[0]=strpos($in,$m[0]); $mp[1]=strpos($in,$m[1]); $ml[0]=strlen($m[0]); $ml[1]=strlen($m[1]); $tmp[1]=explode( " " , trim( substr( $in , $mp[0] + $ml[0] , $mp[1]-$mp[0]-$ml[1]-2 ) ) ); if( $tmp[1] ) $dat[max] = $tmp[1][2]; else $dat[max] = "err"; // [peak] $m[0]="Listener Peak:"; $m[1]="Average"; $mp[0]=strpos($in,$m[0]); $mp[1]=strpos($in,$m[1]); $ml[0]=strlen($m[0]); $ml[1]=strlen($m[1]); $tmp[1]=trim( substr( $in , $mp[0] + $ml[0] , $mp[1]-$mp[0]-$ml[1]-7) ); if( $tmp[1] ) $dat[peak] = $tmp[1]; else $dat[peak] = "err"; } } else { $dat=array(); $dat[status]="err"; } $co = array('[status]','[dj]','[gg]','[gg1]','[genre]','[ile]','[max]','[peak]'); $naco = array($dat[status],$dat[dj],$dat[gg],$dat[gg1],$dat[genre],$dat[ile],$dat[max],$dat[peak]); $sc[template] = str_replace($co,$naco,$sc[template]); $sc[template2] = str_replace($co,$naco,$sc[template2]); $sc[template3] = str_replace($co,$naco,$sc[template3]); ?> </font> <table cellspacing="0" cellpadding="0" background="glowny.jpg" border="0" width="254" height="71" > <tr><td valign="bottom" height="58" width="62" rowspan="2"> </td> <td valign="bottom" height="16" width="87"> </td> <tr> <td valign="middle" height="58" width="87"> <br> <br> <MARQUEE Scrolldelay=200 width="125"><? echo $sc[template]; ?></MARQUEE><MARQUEE Scrollamount=3 width="125"><? echo $sc[template3]; ?></MARQUEE><br> </td> </table> prosze o pomoc ![]() ![]() |
|
|
![]() ![]() |
![]() |
Aktualny czas: 21.08.2025 - 00:33 |