How can i use php?

I know this is a simple question for PHP guys, but I don’t know the language and just want to make a simple “get” from another webpage when my page hits. that is, on another page on which this page was deleted.

EDIT: curl is not available to me.

+5
source share
5 answers

If curls are included (they are by default), you can use:

file_get_contents('http://www.example.org');

Please note that this happens synchronously, so your page will not be either until the request is complete. It would be better to register access to the log file (or database) and periodically export the data. In addition, you can complete the request after completing your page, and the output has been sent to the client.

+6
source

file_get_contents() fopen():

PHP , URL, PHP , allow_url_fopen. , PHP , fopen .

+3

... file_get_contents('http://...'); , fopen(), HTTP-.

, (. curl_init)

+2

GET PHP. , file_get_contents, fopen cURL.

HTTP, fsockopen() fopen.

WordPress, .

+2
0

All Articles