daily pastebin goal
86%
SHARE
TWEET

Untitled

a guest Feb 21st, 2019 78 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //Photos bit...
  2. $destination = 'tmp/ebay';
  3. $filename = 'ebay-photos';
  4.  
  5. //images array
  6. $row = array();
  7. foreach ($result->images as $images) {
  8. $images = explode(',', $row['images']);
  9. foreach ( $images as $image ) {
  10. copy('uploads/used-cars/autotrader/' . $image, $destination . $image);
  11. $all_images[] = $image;
  12. }
  13. }
  14.  
  15. exec('zip  -g0 ' . $zip_filename . ' *.jpg *.jpeg');
  16. foreach ( $all_images as $image ) {
  17. @unlink($destination.$image);
  18. }
  19. $zip_filename = $filename . '.zip';
  20.  
  21. while ($row = @mysql_fetch_assoc($result)){  
  22. $all_images->images as $images);
  23. }
  24.    
  25. while ($row = @mysql_fetch_assoc($result)){  
  26. // XML  
  27. $node = $dom->createElement("ad");  
  28. $newnode = $parnode->appendChild($node);  
  29. $newnode->setAttribute("vrm",$row['vrm']);
  30. $newnode->setAttribute("make",$row['make']);
  31. $newnode->setAttribute("model",$row['model']);
  32. $newnode->setAttribute("type",$row['type']);
  33. $newnode->setAttribute("consumerPrice",$row['consumerPrice']);
  34. $newnode->setAttribute("numPreviousOwners",$row['numPreviousOwners']);
  35. $newnode->setAttribute("transmission",$row['transmission']);
  36. $newnode->setAttribute("images",$row['images']);
  37. $newnode->setAttribute("numPreviousOwners",$row['numPreviousOwners']);
  38. $newnode->setAttribute("color",$row['color']);
  39. }
  40.  
  41. $dom->save('tmp/ebay/ebay.xml');
  42. echo $dom->saveXML();
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top