Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> długość mm:ss MP3
KRCreater
post
Post #1





Grupa: Zarejestrowani
Postów: 68
Pomógł: 0
Dołączył: 13.01.2004
Skąd: Poznań

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


Jak za pomocą php sprawdzić jak długa jest mp3 w formacie minuty:sekundy oraz jak sprawdzić ile zajmuje <-- znajdującą się na innym serwerze, posiadając tylko link (IMG:http://forum.php.pl/style_emoticons/default/snitch.gif)
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
KRCreater
post
Post #2





Grupa: Zarejestrowani
Postów: 68
Pomógł: 0
Dołączył: 13.01.2004
Skąd: Poznań

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


Prubuję to jakoś zrobić żeby cokolwiek wyświetliło i nic hmmmm:

  1. <?php
  2. function get_remote_filesize($url) {
  3. $url = parse_url($url);
  4. $f = fsockopen($url['host'], isset($url['port']) ? $url['port'] : 80);
  5. fputs($f, &#092;"HEAD {$url['path']} HTTP/1.1rnAccept: */*rnHost: {$url['host']}rnrn\");
  6. $txt = fread($f, 4096);
  7. fclose($f);
  8. if (!preg_match('/HTTP/1.1 200 OK/', $txt)) return false;
  9. if (!preg_match('/Content-Length: ([0-9]+)/', $txt, $txt)) return false; else return $txt[1];
  10. echo $txt;
  11. }
  12. $url= &#092;"http://www.jakisserwer.com/161.mp3\";
  13. get_remote_filesize($url);
  14.  
  15. ?>


Ten post edytował KRCreater 16.09.2004, 20:49:18
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: 7.10.2025 - 07:59