cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: PHP CURL Custom HTTP Request Problem

From: Linus Nielsen Feltzing <linus_at_haxx.se>
Date: Tue, 04 May 2010 07:05:59 +0200

Dung Nguyen skrev:
> Hello all!
> I'm trying do a request use CURL. This request is a GET request. I want
> to do like this
>
> GET /config?x=0.12345 HTTP/1.1
> Content-Type: application/x-www-form-urlencoded
> Cookie: JSESSIONID=9JHDF83VJ390FJ30FJ4V04J9V04J4
> Host: example.com <http://example.com>
> Accept: text/html, */*
> User-Agent: Mozilla/3.0
>
> however i can't make it work for CURL, it always transfer my request to
> GET /config? HTTP/1.1
> and this cause my request faild :(
>
> Is there any way to solve my problem ?

I'm sure there is, but we can't help you if you don't show us your PHP code.

Linus

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2010-05-04