| |
|
|
|
cURL Mailing List Monthly Index Single Mail
curl-and-php mailing list Archives
difficuylt website to reach and get content from
From: info yuplounge <info_at_yuplounge.com>
Date: Sat, 7 May 2005 11:01:14 +0200
I have the following problem:
When I try to get the content of www.vbo.nl <http://www.vbo.nl/> I get
HTTP/1.1 302 Found Transfer-Encoding: chunked Server: Microsoft-IIS/5.0
When I try to get the content of www.alternate.nl <http://www.alternate.nl/>
When I let www.websiteoptimization.com/services/analyze/ analyse www.vbo.nl
What do I do wrong?
I use the following php code:
<?php
$ch = curl_init(); // create cURL handle (ch)
if (!$ch) {
die("Couldn't initialize a cURL handle");
}
// set some cURL options
$ret = curl_setopt($ch, CURLOPT_URL, "http://www.vbo.nl/");
$ret = curl_setopt($ch, CURLOPT_HEADER, 1);
$ret = curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
$ret = curl_setopt($ch, CURLOPT_RETURNTRANSFER, 0);
$ret = curl_setopt($ch, CURLOPT_TIMEOUT, 130);
// execute
$ret = curl_exec($ch);
if (empty($ret)) {
// some kind of an error happened
die(curl_error($ch));
curl_close($ch); // close cURL handler
} else {
$info = curl_getinfo($ch);
curl_close($ch); // close cURL handler
}
?>
These mail archives are generated by hypermail. |
Page updated November 12, 2010.
web site info