can I use file_get_contents to send an http request to my host with GET parameters? If yes, I have other 3 questions: Firstly, how? Can I use https instead of http? Can I send them to another host (an external one)? Thx in advance, pls don't blame me if it is stupid
Yes.
?
: ?param1=value1¶m2=value2
. You can use http_build_query()
to convert an associative array to URL query parameters.https:
in the URL.$result = file_get_contents('https://www.google.com/search?q=words+to+search+for');