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

curl-and-php

Re: Ignoring dns lookups in php / lib curl.

From: Kevin Revill <krevill_at_plus.net>
Date: Fri, 17 Dec 2004 09:19:16 +0000

Hi Daniel,

many thanks for that.

Kevin

Daniel Stenberg wrote:

> On Fri, 17 Dec 2004, Kevin Revill wrote:
>
>> I already found that snippet of code on the curl site, but i can not
>> find the php curl variant. Anyone can enlighten me of it?
>
>
> Ok, allow me to write this off the top of my head and please bear with
> my lack of PHP skills:
>
> $header[] = "Host: my.wonderful.host";
> $url = "http://10.0.0.1/";
>
> $ch = curl_init($url);
>
> curl_setopt($ch, CURLOPT_HTTPHEADER, $header);
> curl_setopt($ch, CURLOPT_URL, $url);
>
> // possibly some more options
>
> $result = curl_exec($ch);
> curl_close($ch);
>
Received on 2004-12-17