<? $fp = fopen("sample.jpg", "w"); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, "http://sample/sample.jpg"); curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1)"); curl_setopt($ch, CURLOPT_FILE, $fp); curl_exec($ch); fclose($fp); curl_close($ch); ?>http://sample/sample.jpg 를 sample.jpg 로 저장한다.