Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [php]Radio na strone problem
Tygrys22
post
Post #1





Grupa: Zarejestrowani
Postów: 26
Pomógł: 0
Dołączył: 29.06.2008

Ostrzeżenie: (10%)
X----


Posiadam skrypt na radio na strone.
Jestet to tylko player radiowy a fale jaką chcemy wprowadzamy sami np http://shoutcast.omroep.nl:8058
Mam z nim problemy poniewaz nie cos nie chce mi sie wczytywac kolejna fala pisze ze jest jakis błąd. Korzysta on równiez z bazy MSql

Oto link do pobrania plików radia:
http://www.mirrorservice.org/sites/downloa...pl-1.6-noir.zip

Z góry dzikuje za pomoc
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
Tygrys22
post
Post #2





Grupa: Zarejestrowani
Postów: 26
Pomógł: 0
Dołączył: 29.06.2008

Ostrzeżenie: (10%)
X----


Oto kawałek kodu mysle sadze iz tu mam błąd:

  1. <?php
  2. $play_file="";
  3. $autostart=0;
  4.  
  5. }
  6.  
  7.  
  8.  
  9. if ($port!=80) {
  10. require ("cfg.php");
  11. $current_date = date("Y-m-d");
  12. $conn = @mysql_connect($dbhost, $dbuser, $dbpass) or die("<b> MySQL connection error :</b><br><br>The MySQL server seems to be offline. If not, please check if the host, user 
    or password are correct."
    );
  13. $db = @mysql_select_db($db, $conn) or die("<b> Error selecting database :</b><br><br>I can't connect to database &quot;$db&quot;");
  14. $match = "SELECT url FROM radios WHERE url = '$_POST[submit]'";
  15. $query_match = @mysql_query ($match, $conn) or die("<b> Error :</b><br><br> Cannot execute query. Please check the MySQL syntax.");
  16. $count_match = mysql_num_rows ($query_match);
  17.  
  18.  
  19.  
  20.  
  21. if ($count_match < 1) {
  22.  
  23. $insert_data = "INSERT INTO radios VALUES ('' ,'$_POST[submit]' , '$current_date')" or die(mysql_error());
  24. $optimize = "OPTIMIZE TABLE radios";
  25. $query_opt = @mysql_query ($optimize , $conn) or die("<b> Error :</b><br><br> Cannot execute query. Please check the MySQL syntax.");
  26. $query = @mysql_query ($insert_data, $conn) or die("<b> Error :</b><br><br> Cannot execute query. Please check the MySQL syntax.");
  27. $play_file=$_POST['submit'];
  28. $autostart=1;
  29.  
  30.  
  31. }
  32.  
  33.  
  34.  
  35. elseif ($count_match > 0) {
  36.  
  37. print "<script LANGUAGE=\"JavaScript\">
  38. alert(\"This URL already exists in the radios list!\")
  39. parent.play.location.href=\"player.php\";
  40. </script>";
  41. $play_file="";
  42. $autostart=0;
  43.  
  44.  
  45.  
  46. }
  47.  
  48. }
  49.  
  50. fclose($fp); 
  51.  
  52. }
  53.  
  54. else {
  55.  $play_file="";
  56. print "<script LANGUAGE=\"JavaScript\">
  57. alert(\"I can't connect to this host\nMaybe the host is offline or is not valid\nPlease check the spelling and than try again.\")
  58. parent.play.location.href=\"player.php\";
  59. </script>";
  60. ?>


  1. <?
  2. $dbhost = "xxxxxx"; // MySQL hostname
  3. $db = "xxxxxxx"; // Database name
  4. $dbuser = "xxxxxx"; // Database username
  5. $dbpass = "xxxxxx"; // Database password
  6.  
  7. // Upload data
  8.  
  9. $enabled=1; //Enable or disable file uploading. 0=disable; 1=enable
  10. $dir = "media"; // Directory in witch the audio files are stored. By default, this directory is ca
    lled media (player/media).
  11. $audioext = "mp3,wav,mid,wma,m3u"; // Audio extensions. ATENTION! Extensions like mp4 and ram are not supported.
  12. $file_max_size = "3000"; // Maximum allowable file size in bytes that can be uploaded.
  13.  
  14. // URL playing
  15.  
  16. $play=1; //Enable or disable URL playing. 0=disable; 1=enable. If you disable this option, 
    the URL field will not be displayed.
  17. $filter=".php.mp3,.php.wav,.php.mid,.php.wma,.php.m3u,.php.,.exe."; //Filter the URL input field.
  18.  
  19. //Autostart player
  20.  
  21. $play_file = "http://shoutcast.omroep.nl:8058"; //The URL of the file or radio station to be played;
  22. $autostart_player = 1; // Start the player automaticly at every launch; 0=disabled; 1 = enabled;
  23.  
  24. ?>
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 11.10.2025 - 00:58