martib;11039249 wrote:Dear sneakyimp why would I need a reference to index.php or any query string parameters to retrieve a remote file?
Because you wrote
martib;11039023 wrote:
I have an index.php and curl (and file_get_contents) can retrieve the content from a remote file.
but for pages like index.php?action=detail&id= or index.php/action::detail/id::
curl (and file_get_contents) are not pulling the content and stay just blank (no error message)
… which tells us that
1. requesting index.php results in curl getting contents and your script sending output in its response
2. requesting index.php with a query string results in a blank page and curl fetching nothing.
Which means that it might be an idea to investigate what the differences between a request for index.php and index.php?action=detail&id=
Either way you should always check if curl succeeds or not - and this goes for any other actions that may fail. [man]curl_errno[/man] to check for success, [man]curl_error[/man] to get human readable information.
I also recommend that you upgrade to php 5.5.10