i need to do a “file_get_contents” on a URL and there has to be data posted to the url before the contents are retrieved. is this possible? maybe something like
$contents = file_get_contents($_POST"http://www.example.com/");
so that i can then work with the $contents variable?
You cannot*** POST data using
file_get_contents, you must use something like cURL* I mark this because it is actually possible taking advantage of the third parameter which uses http context(see example one). However it really isn’t worth your trouble if you have something like cURL.