Jump to content
php.lv forumi

Neliels errors


Snaip3Rs

Recommended Posts

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!

Link to comment
Share on other sites

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 by Faks
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...