CI, JSON Output, file_get_contents and cURL issue |
[eluser]Unknown[/eluser]
Ok, please bear with me as I am going to try and explain the issue I am encountering as best as possible. I have a method within a controller eg: http://local.demo.com/controller/method that is outputting JSON eg: Code: <?php If navigate to http://local.demo.com/controller/method I am able to view valid JSON with no issues. If I attempt to use file_get_contents or to cURL the URL in another .php file to decode the JSON it is returned as null. Now if I use file_get_contents or cURL on something like http://local.demo.com and the default controller is "controller" and the same code exists in the index method it works. eg: Code: <?php So, is the default controller and index method somehow making it not possible to access the desired controller and method via file_get_contents or cURL. Hopefully this makes sense. Thanks for any input. |
Messages In This Thread |
CI, JSON Output, file_get_contents and cURL issue - by El Forum - 07-12-2013, 11:45 AM
|