If you want this done by the server, rather than the client (as in sarahk's solution), the cURL library will allow the server to put a POST request together and submit it to XYZ, and retrieve the results.
If cURL is overkill, then the fsock*() functions can be used instead - you'll need to put an HTTP POST request together by hand, but it may be a cleaner solution.