1--TEST-- 2Test curl_error() & curl_errno() function with problematic host 3--CREDITS-- 4TestFest 2009 - AFUP - Perrick Penet <perrick@noparking.net> 5--EXTENSIONS-- 6curl 7--SKIPIF-- 8<?php 9 $addr = "www.".uniqid().".".uniqid(); 10 if (gethostbyname($addr) != $addr) { 11 print "skip catch all dns"; 12 } 13?> 14--FILE-- 15<?php 16 17$url = "http://www.".uniqid().".".uniqid(); 18$ch = curl_init(); 19curl_setopt($ch, CURLOPT_URL, $url); 20 21curl_exec($ch); 22var_dump(curl_error($ch)); 23var_dump(curl_errno($ch)); 24curl_close($ch); 25 26 27?> 28--EXPECTF-- 29%s resolve%s 30int(6) 31