[TYPO3-dev] Equivalent to t3lib_div::getURL() for posting too?

Martin Kutschker masi-no at spam-typo3.org
Sun Aug 24 23:12:57 CEST 2008


Francois Suter schrieb:
> Hi all,
> 
> With t3lib_div::getURL() we have a very convenient method for reading a
> file or a remote URL using either curl of fsockopen, and which also
> takes care of a lot of fluff.
> 
> But it can't send data to the URL, like POST data for example. Is there
> an equivalent method which could do this?

The HTTP equivalent for sending data is PUT not POST. PUT sends an
"updated" vesrion of the URL to the server. POST OTOH accepts structured
data (multiple arguments which may be files).

PUT is rarely used and POST is application/script/URL specific.

So what exactly do you want to do? Send POST data to a script? I think a
general "upload" function is not so easily done as a "download" function .

Masi




More information about the TYPO3-dev mailing list