Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to POST XML data via PHP?

Status
Not open for further replies.

rhyno2k

IS-IT--Management
Jun 9, 2001
222
0
0
US
Hi, I'm trying to performing simple DHL tracking using PHP. Their specs require that you POST your tracking number(s) via XML, and then are returned XML with their status (which I'll parse in an existing script listing current shipments).

Their documentation details each XML element (they're focusing on creating/modifying shipment), but does not give a single practical code example for any language. I googled around and found a DHL class on PHPClasses.org, but that contained methods & properties for every single part of a shipment... except tracking! I think cURL would be an ideal solution for this, but haven't gotten anything to work.

I simply need to be able to POST XML data to a remote server using PHP.

Any ideas?

Thanks,
--RHYNO
 
where is the DHL documentation? i had a brief look at their site but nothing jumped out.
 
I'm being dumb, I'm sure: but the documentation is pretty straightforward as to the required XML schema. the stumbling block, i'd guess, is whether or not you have the requisite access codes (Requestor ID and Requestor Password) to be allowed to use the tracking API?

without those i guess you will have to use the public methods available on their website. you could try and reverse engineer the javascript form handling they use and then scrape the results page. they might do some referrer testing though, so this method is far from guaranteed.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top