dsaba Posted December 28, 2007 Share Posted December 28, 2007 I am aware of cURL and its ability to send customized headers on HTTP requests. I've been looking at these functions: http://us3.php.net/manual/en/ref.stream.php http://us3.php.net/manual/en/function.stream-socket-sendto.php I read but I didn't see anything about being able to send headers on HTTP requests, how can I do this without cURL in php? Any ideas? Link to comment https://forums.phpfreaks.com/topic/83423-how-to-pass-header-information-without-curl-when-requesting-a-webpage/ Share on other sites More sharing options...
MadTechie Posted December 28, 2007 Share Posted December 28, 2007 use sockets <?php $connection = fsockopen ("www.phpfreaks.com", 80); if ($connection) { fwrite($connection, "HEAD / HTTP/1.1\r\nHOST: www.phpfreaks.com\r\n\r\n"); } ?> Link to comment https://forums.phpfreaks.com/topic/83423-how-to-pass-header-information-without-curl-when-requesting-a-webpage/#findComment-424423 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.