07.05.2014 Views

OpenSRS API Integration for XML

OpenSRS API Integration for XML

OpenSRS API Integration for XML

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Example<br />

Content-length: 55\015\012<br />

# blank lines are ignored<br />

# carriage return/line feed<br />

<br />

<br />

<br />

<br />

0.9<br />

<br />

<br />

[ etc ]<br />

<br />

XCP allows empty space to be placed in the <strong>XML</strong> message, as long as the<br />

<strong>XML</strong> is still valid, so empty lines or end-of-line characters may be inserted<br />

(though they must be counted in the byte count).<br />

For more in<strong>for</strong>mation regarding the transmission of data over HTTPS, refer to<br />

this document: http://www.ietf.org/rfc/rfc2616.txt<br />

MD5 Examples<br />

The following examples show how to add an MD5 Signature and create an<br />

<strong>XML</strong> packet <strong>for</strong> the various client languages.<br />

PERL<br />

use Digest::MD5 qw/md5_hex/;<br />

md5_hex(md5_hex($xml, $private_key),$private_key)<br />

PHP<br />

md5(md5($xml.$private_key).$private_key);

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!