Jump to content

the output


runeveryday

Recommended Posts

<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "http://example.com/");
curl_setopt($ch, CURLOPT_HEADER, 1);     
curl_setopt($ch, CURLOPT_NOBODY, 1); 
$data=curl_exec($ch);
?>

i want to output the result in line.eg:

Date: Wed, 23 Sep 2009 05:25:03 GMT  
Server: Apache/2.2.11 (Unix) mod_ssl/2.2.11 OpenSSL/0.9.8e-fips-rhel5 mod_bwlimited/1.4 mod_perl/2.0.4 Perl/v5.8.8  
Location: http://www......
Vary: Accept-Encoding  
Content-Encoding: gzip  
Content-Length: 192 

 

how i should i do?

Link to comment
https://forums.phpfreaks.com/topic/175185-the-output/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.