943,546 Members | Top Members by Rank

Ad:
  • PHP Discussion Thread
  • Unsolved
  • Views: 8251
  • PHP RSS
Nov 28th, 2008
0

HTTP request

Expand Post »
Can someone please tell me how to send a HTTP request through PHP .
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
Anjali.want4u is offline Offline
3 posts
since Nov 2008
Nov 29th, 2008
0

Re: HTTP request

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
Sponsor
Featured Poster
Reputation Points: 410
Solved Threads: 258
Occupation: Genius
cwarn23 is offline Offline
3,004 posts
since Sep 2007
Dec 8th, 2008
0

Re: HTTP request

Click to Expand / Collapse  Quote originally posted by cwarn23 ...
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
Moderator
Reputation Points: 457
Solved Threads: 101
Nearly a Posting Virtuoso
digital-ether is offline Offline
1,250 posts
since Sep 2005

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in PHP Forum Timeline: number string
Next Thread in PHP Forum Timeline: Pop up and Email Reminder in agenda





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC