Posted By

digitalzoomstudio on 11/25/10


Tagged

php backup flash


Versions (?)

PHP XML HTML Backup for Flash


 / Published in: PHP
 

URL: http://digitalzoomstudio.net

You can use this code under MIT licence.

  1. function readXML($arg, $type)
  2. {
  3. $i=0;
  4. $xml = simplexml_load_file($arg);
  5.  
  6. if($type=='main'){
  7. foreach($xml->children() as $child) {
  8. if($child->getName()=="item"){
  9. echo "<h3>" . $child->title . "</h3>";
  10. if($i==0)
  11. readXML('http://localhost/wordpress/?mode=xml&xmlfile=rotator.php&page=1', 'images');
  12. $i++;
  13. }
  14. }
  15. }
  16. if($type=='images'){
  17. $aux = '<div id="coinslider">';
  18. foreach($xml->children() as $child)
  19. {
  20. if($child->getName()=="item")
  21. {
  22. $aux = $aux . '<img src="' . $child->file . '"/>';
  23. }
  24. }
  25. $aux = $aux . '</div>';
  26. echo $aux;
  27. }
  28. }
  29.  
  30. readXML("http://localhost/wordpress/?mode=xml", "main");

Report this snippet  

You need to login to post a comment.