I wanna make process on $url
address,so I use this code
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,$url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$response = curl_exec($ch);
echo $response;
It will do it and return response to.
I don't need to get response of page,I think it will be faster and开发者_如何学Go use less traffic. is following code can do it?
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,$url);
curl_exec($ch);
$url
is captcha maker url.
If you omit
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
response will go directly to output, connection itself works the same way, so this will not save you neither time nor traffic. But you can set CURLOPT_CUSTOMREQUEST to 'head', this way you will receive only headers of response (without html).
精彩评论