I have received the following from a company; any ideas on how I go about implementing it?
I guess I have to use javascript for this but how do you call a function via an http request?

With the content supply interface customers can retrieve content from the system directly.
The returned values must be inserted in the function call.
The content supply is approached just like a normal XML API via an http request.

The function to be accessed is called “externalContent“.

Call parameters:
[sessionid; corresponding sessionid] Either the affiliateid or the sessionid must be stated. The session must be stated if a purchase was initiated via the shopping cart.
[affiliateid; corresponding affiliateid]
buyidsCompiled list of returned buyids via “_“
payidpayid of the external payment call returned by the system
test mode“true“ or “false“
checkThis is the md5 sum of the character string, which was compiled by all call parameter values (in the above mentioned order). This md5 sum was then encoded with the previously agreed code word XOR-. This encoded value must be encoded in base64.

*: errorurl is the URL, which the end consumer is directed to via redirect in the event of a faulty download. The call of this URL is complemented by the parameters
“errormsg“ und “errorcode“ from the system.

link0 ... linkNThe corresponding link to the content quotes either “album“ or “track“ in the “targettype“ attribute. The “targetid“ attribute contains the corresponding id of the content.

msgTextual representation of the result

In the event of an error (e.g. wrong “amount“ or “check“) both return values are –1.