1. PHP / Говнокод #4941

    +157

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    11. 11
    12. 12
    13. 13
    14. 14
    15. 15
    16. 16
    17. 17
    18. 18
    19. 19
    20. 20
    21. 21
    22. 22
    23. 23
    24. 24
    25. 25
    26. 26
    27. 27
    28. 28
    29. 29
    30. 30
    31. 31
    32. 32
    33. 33
    34. 34
    35. 35
    36. 36
    37. 37
    $query = "SELECT * FROM records WHERE  id_film='$id_film'";        
    $results = mysql_query($query);
    $var1 = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n";
    $var1 = $var1. "<playlist>\n";     
    while($line = mysql_fetch_assoc($results))
      {
    $tmp_us = $tmp_us.$line['id_user'];
      $var1 = $var1."<vid src=\"http://homelinux.com:8080/sample1/content/audiorecord/"
      . $line['id_user']
      ."/"
      . $line["file_name"]
      ."_d.flv"
      . "\" label=\""
      . $line["file_name"]
      ."\""
      ." id_film=\""
      . $line["id_film"]
      ."\""
      ." time_begin=\""
      . $line["time_begin"]
      ."\""
      ." time_end=\""
      . $line["time_end"]
      ."\""
      ." id_user=\""
      . $line["id_user"]
      ."\""  
      ." sh_val=\""
      . $line["sh_val"]
      ."\""
      ." id_record=\""
      . $line["id_record"]
      ."\""
      ."/>\n";
    }
    $var1 = $var1."</playlist>\n"; 
    echo "var1=$var1";

    Вот так некоторые Flash-еры формируют xml пакеты

    Запостил: Agel_Nash, 16 Декабря 2010

    Комментарии (20) RSS

    Добавить комментарий