Re: Send XML file with curl functions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The problem is that it is a 3rd party API that I am trying to submit data to. I have submitted a request to make the necessary changes for what I'm trying to do.


Nathan Nobbe wrote:
On Sun, Apr 13, 2008 at 1:07 PM, Aaron Axelsen <lists@xxxxxxxxxxxx> wrote:

Option 2 is what I'm trying to do, but the problem is that when curl
sends the file over the command line, when it's processes via PHP the
attached file comes over $_FILES.


im lost here.  in option 2 from Bojan's post there is no attached file.
there is only a variable that happens to store xml.  if php is handling the
request on the system hosting $url from said post then the xml data will be
made available in the $_POST array albiet the 'data' index.
ergo, php on said system would look something like this

<?php
$rawRequestXml = $_POST['data'];
try {
  $requestXml = new SimpleXmlElement($rawRequestXml);
} catch(Exception $e) {
  // do error handling stuff
}
?>


But, added the postdata obviously doesn't allow it to come over that
way.  Is there any way to use option 2 and transmit the file so it will
come over under $_FILES?


i dont understand the 'need'  to have the request data available in the
$_FILES array; whats wrong w/ $_POST ?

-nathan


--
Aaron Axelsen
lists@xxxxxxxxxxxx

Great hosting, low prices.  Modevia Web Services LLC -- http://www.modevia.com


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux