runeveryday Posted September 23, 2009 Share Posted September 23, 2009 <?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 More sharing options...
trq Posted September 23, 2009 Share Posted September 23, 2009 Your question is what? Link to comment https://forums.phpfreaks.com/topic/175185-the-output/#findComment-923337 Share on other sites More sharing options...
Mark Baker Posted September 23, 2009 Share Posted September 23, 2009 echo '<pre>'.$data.'</pre>'; Link to comment https://forums.phpfreaks.com/topic/175185-the-output/#findComment-923338 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.