3
Contributors
2
Replies
3
Views
8 Years
Discussion Span
Last Post by digital-ether
0

Although I don't know anything about it there is a function called http_request(); and the official documentation can be found at http://php.net/manual/kr/function.http-request.php

Note that this is a pecl extension. You'll have to build it into PHP.

If you need just a simple HTTP Request, you can use file_get_contents().
This makes a HTTP GET Request to the URL you give it (if the http wrapper is enabled allow_url_fopen).

You can also use the curl functions:
http://www.php.net/manual/en/ref.curl.php

Or see the docs on getting remote files:
http://www.php.net/manual/en/features.remote-files.php

For custom HTTP Requests use CURL or you can use fsockopen(), with fread() and fwrite().

Pear also provides a HTTP package:
http://pear.php.net/package/HTTP_Request2

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.