Title: PHP for Custom XML
Last modified: August 20, 2016

---

# PHP for Custom XML

 *  Resolved [Rehm](https://wordpress.org/support/users/rehm/)
 * (@rehm)
 * [14 years, 10 months ago](https://wordpress.org/support/topic/php-for-custom-xml/)
 * Hi,
 * Does anyone know where I can find a PHP script that provides XML for Nextgen 
   Albums and Galleries?
 * Thanks,
    Rehm

Viewing 11 replies - 1 through 11 (of 11 total)

 *  [Alex Rabe](https://wordpress.org/support/users/alexrabe/)
 * (@alexrabe)
 * [14 years, 10 months ago](https://wordpress.org/support/topic/php-for-custom-xml/#post-2233897)
 * What means a PHP script ? What do you want do archive ?
 *  Thread Starter [Rehm](https://wordpress.org/support/users/rehm/)
 * (@rehm)
 * [14 years, 10 months ago](https://wordpress.org/support/topic/php-for-custom-xml/#post-2233990)
 * Hi Alex,
 * Thanks for responding, I had almost given up, my previous post had more details.
   [http://wordpress.org/support/topic/nextgen-gallery-xml-output?replies=3](http://wordpress.org/support/topic/nextgen-gallery-xml-output?replies=3)
 * The idea is to have formatted XML generated for the Nextgen gallery that looks
   like this:
 * [http://pastebin.com/hQsrV4zm](http://pastebin.com/hQsrV4zm)
 * I want to be able to go ‘xml.php?aid=0’ and have it return XML for the galleries
   in the specified album.
 *  [youclaimit](https://wordpress.org/support/users/youclaimit/)
 * (@youclaimit)
 * [14 years, 10 months ago](https://wordpress.org/support/topic/php-for-custom-xml/#post-2233991)
 * I need to paste an AdSense ad code on my WordPress website. Does anyone know 
   how I do that? Thank you so very much for your help!
 *  [Alex Rabe](https://wordpress.org/support/users/alexrabe/)
 * (@alexrabe)
 * [14 years, 10 months ago](https://wordpress.org/support/topic/php-for-custom-xml/#post-2233992)
 * Well out of the box this is not possibe/available… look into xml/json.php this
   class should be easy to modify in your direction
 *  [youclaimit](https://wordpress.org/support/users/youclaimit/)
 * (@youclaimit)
 * [14 years, 10 months ago](https://wordpress.org/support/topic/php-for-custom-xml/#post-2233994)
 * Thank you Alex for your response. How do I do the modification to have xml/json.
   php?
 *  [Alex Rabe](https://wordpress.org/support/users/alexrabe/)
 * (@alexrabe)
 * [14 years, 10 months ago](https://wordpress.org/support/topic/php-for-custom-xml/#post-2233995)
 * Sorry, my repsone was for Rehm, not talking about AdSense…
 *  Thread Starter [Rehm](https://wordpress.org/support/users/rehm/)
 * (@rehm)
 * [14 years, 10 months ago](https://wordpress.org/support/topic/php-for-custom-xml/#post-2233998)
 * Will the json.php allow me to retrieve gallery data by album ID?
 * I tried hitting the script in my browser like so: xml/json.php?aid=1 but this
   obviously is not the way. How exactly do I get post data from json.php? Can I
   pass it a parameter of some kind?
 * By the way, I have no experience with json, I hear it’s faster than xml since
   the structure holds less repetative data and only the required values, but that’s
   it.
 * Thanks, I don’t know how you respond to all these questions, you must have cloned
   yourself…
 *  [Alex Rabe](https://wordpress.org/support/users/alexrabe/)
 * (@alexrabe)
 * [14 years, 10 months ago](https://wordpress.org/support/topic/php-for-custom-xml/#post-2234001)
 * No, you need to extend the lib for your needs, it doesn’t give you the result
   out of the box
 *  Thread Starter [Rehm](https://wordpress.org/support/users/rehm/)
 * (@rehm)
 * [14 years, 9 months ago](https://wordpress.org/support/topic/php-for-custom-xml/#post-2234034)
 * Hi Alex,
 * I now have the PHP script that creates the XML I needed, however it is only able
   to sort by ID and I would like to use the “sortorder” so that galleries can be
   rearanged and the XML be updated accordingly.
 * I think this will be a very useful addition to the Nextgen Gallery once this 
   piece of functionality is added. Would you be willing to assist if I provide 
   the script so far? Then we can share it with everyone.
 *  [Alex Rabe](https://wordpress.org/support/users/alexrabe/)
 * (@alexrabe)
 * [14 years, 9 months ago](https://wordpress.org/support/topic/php-for-custom-xml/#post-2234036)
 * You can post your script & needs at my GoogleCode page
 *  Thread Starter [Rehm](https://wordpress.org/support/users/rehm/)
 * (@rehm)
 * [14 years, 9 months ago](https://wordpress.org/support/topic/php-for-custom-xml/#post-2234037)
 * I’ve posted it here: href=”[http://code.google.com/p/nextgen-gallery/issues/list?thanks=412&ts=1314536678](http://code.google.com/p/nextgen-gallery/issues/list?thanks=412&ts=1314536678)
 * It’s posted as a defect, but it’s meant to be an enhancement, didn’t know how
   to change that.
 * ID: 412
    Title: Formatted XML for Nextgen Galleries by Album ID

Viewing 11 replies - 1 through 11 (of 11 total)

The topic ‘PHP for Custom XML’ is closed to new replies.

 * ![](https://ps.w.org/nextgen-gallery/assets/icon-256x256.png?rev=2083961)
 * [Photo Gallery, Sliders, Proofing and Themes - NextGEN Gallery](https://wordpress.org/plugins/nextgen-gallery/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/nextgen-gallery/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/nextgen-gallery/)
 * [Active Topics](https://wordpress.org/support/plugin/nextgen-gallery/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/nextgen-gallery/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/nextgen-gallery/reviews/)

 * 11 replies
 * 3 participants
 * Last reply from: [Rehm](https://wordpress.org/support/users/rehm/)
 * Last activity: [14 years, 9 months ago](https://wordpress.org/support/topic/php-for-custom-xml/#post-2234037)
 * Status: resolved