XML communication suggestions

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
Hello all,

I'm working on a professional invoice webapplication. I'm working on
means to automate the invoice generation. Therefor I created a class
which creates invoices using given XML-data. This is what the server
can do...

Now I'm looking for solutions to allow clients with external servers
(like websites) to send XML data to the API. Here I'm stuck...

- email : I already have some experience with a mail parser and a
mail2php pipe, but I never succeeded in parsing the attachments. Does
anyone have any experience with parsing mail attachments ?

- SOAP : I've been looking at the SOAP client/server objects in PHP,
but they seem quite complicated to provide on clients who want to
automate invoices...

- HTTP request : Is there a way to upload a file with an HTTP request
programmatically ?

- ... (maybe someone has other solutions ?)

Thanks in advance for your input.

Kind regards

Re: XML communication suggestions

Quoted text here. Click to load it
Could I ask how you created your class (any examples would be great)? I've  
been trying something similar for something on my own site (not invoices),  
and I am having awful trouble with it.
Each alteration I make to fix one thing seems to cause another problem I  
wasn't expecting, and I've never done anything with classes before.



Re: XML communication suggestions

Quoted text here. Click to load it

Hi Phil

I used the PHP DOM XML objects to parse the XML file, in order to
translate the data into an array, which is dan injected in MySQL.

You should look at :

These functions only work in PHP4. I'll need to rewrite the class to
let it work in PHP using the DOM functions :

I you like, I can mail you the class if you like...

Kind regards,

Re: XML communication suggestions

Quoted text here. Click to load it


Quoted text here. Click to load it
You can create and <form> with hidden input. Into this hidden input you can  
put base64 encoded xml file and submit form. This you can do in PHP on  
external server and this php script can work under cron or some like cron.  
External user download some your script, setup it on his server and are  
ready to sending xml to you.

Or you can build some application for users, eg. in Perl/Tk. This is  
multiplatform (Windows, Linux) and you can comunicate with your app in any  
protocol you want. If you don't know Perl/Tk, you can try my Graphical Ping  
app here
http://www.stahuj.cz/internet_a_site/monitoring_site/grping/download/?g [oz]=1.2&g[up]=
or here

Don't dread that pages are in Czech language. My app have English too :-)

Petr Vileta, Czech republic
(My server rejects all messages from Yahoo and Hotmail. Send me your mail  
from another non-spammer site please.)

Site Timeline