cURL / Mailing Lists / curl-and-php / Single Mail

curl-and-php

Re: simulateous POST and GET request

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Sat, 8 Dec 2007 23:42:28 +0100 (CET)

On Sat, 8 Dec 2007, Rodik wrote:

> I need to make POST and GET requests simulateously

Sorry, but that doesn't make sense.

> it seems that curl doesn't support posting data to url with get data.

?

GET has no data, it just gets a URL.

> I tryed to set both CURLOPT_HTTPGET and CURLOPT_POST but it didn't work.

No, in HTTP there's one method in the request. It is either GET or POST, you
can't do both. You'd have to do two separate requests then.

> For example I need to POST var2=var2 to
> http://www.example.com/index.php?var1=var1.
> Any suggestions?

Sure: that's a POST of the data "var2=var2" to the URL
"http://www.example.com/index.php?var1=var1"

-- 
  Commercial curl and libcurl Technical Support: http://haxx.se/curl.html
_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php
Received on 2007-12-08