Snaip3Rs Posted October 11, 2010 Report Share Posted October 11, 2010 Man ir radio scripts ko pats nesu taisijis un nesaprotu kā izlabot error! Warning: fsockopen() [function.fsockopen]: unable to connect to [color="#FF0000"]mans ip[/color] (A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. ) in D:\web\www\radio\faili\stats\radio_stats.php on line 11 Midnight Radio notiek remontdarbi! Zinu ka kļūda ir uz 11 rindkopas! config_ <?php////////////////////////////////////////////////////////////////////////////////////////////// // Stats Information // Grabs the xml from your radio server and displays it in a iframe that refreshes every 30 seconds. ////////////////////////////////////////////////////////////////////////////////////////////// //Configuration $scdef = ""; // Default station name to display when server or stream is down $scip = "mans ip"; // ip or url of shoutcast server $scport = "8000"; // port of shoutcast server $scpass = "pass"; // password to shoutcast server //End configuration ?> Radio_stats http://paste.php.lv/8e6462901300b57467ba7e77e8a37ff2?lang=php Varētu kāds uzlikt ja tas ir viegli lai ja radio ir ofline vai nevar connect lai rāda image offline.gif tur kautkas tāds ir tikai nekas nenotiek! :( Pladies par atsaucību! Quote Link to comment Share on other sites More sharing options...
Faks Posted October 11, 2010 Report Share Posted October 11, 2010 (edited) Reku ir mans kods kurš strāda kā pulstenīts te būs maza dāvana :) par tavu izmantoto kodu neteiktu ka slikts bet tā uz pirmā acu metiena neredz kļūdu . // Statusa Skripts // Coded By Faks In 2010 | http://faks.sytes.net/ $remote_ip = "faks.sytes.net"; // Domaina Vards vai Ip Adresse $remote_port = "80"; // Ports $timeout = "5"; // Parbaudes Laiks ir 5 Sekundes @$check = fsockopen($remote_ip,$remote_port,$errno,$errstr,$timeout); if ($check){ echo "Online"; }else { echo "offline"; } @fclose($check); Edited October 11, 2010 by Faks Quote Link to comment Share on other sites More sharing options...
indoom Posted October 12, 2010 Report Share Posted October 12, 2010 Domājat, ka tie kļūdu paziņojumi ir tikai smukumam? unable to connect to [color="#FF0000"]mans ip[/color] Quote Link to comment Share on other sites More sharing options...
Snaip3Rs Posted October 12, 2010 Author Report Share Posted October 12, 2010 Smukumam ir šis [ Midnight Radio notiek remontdarbi! Varat ielikt šajā koda ko iedevu tādu fiču jo pats kartīgi šo fīču nerubiju! Piemēram If canot connect tad echo ofilne.png else rāda dziesmu dj un visu pārējo! Quote Link to comment Share on other sites More sharing options...
snach15 Posted October 13, 2010 Report Share Posted October 13, 2010 (edited) nu pieliec vnk else { echo "<img src='offline.jpg' />"; die;} Edited October 13, 2010 by snach15 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.