root
Moderator
- CURLOPT_HEADER: nếu là true thì sẽ hiện thị header, false thì ko
	
		
	
		
				
			
		PHP:
	
	<?php
// khởi tạo 1 url mới
$ch = curl_init();
$url="http://svuit.com/forum.php"
// Thiết lập URL và đưa ra header
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_HEADER, true);
// lấy URL và thực hiện chạy nó
curl_exec($ch);
// close cURL resource, and free up system resources
curl_close($ch);
?>
	- Kết quả
 
		Mã:
	
	[COLOR=#3E3E3E]HTTP/1.1 200 OK Date: Sat, 25 Jan 2014 15:07:22 
GMT Server: Apache X-Powered-By: PHP/5.3.27 
Cache-Control: private Pragma: private 
Set-Cookie: bb_lastvisit=1390662442; 
expires=Sun, 25-Jan-2015 15:07:22 GMT; 
path=/ Set-Cookie: bb_lastactivity=0; 
expires=Sun, 25-Jan-2015 15:07:22 GMT; 
path=/ Content-Length: 82981 Content-Type: text/html; 
charset=UTF-8
[/COLOR]
	Bài viết mới