Welcome Guest, Not a member yet? Register   Sign In
Local CURL Request, or file_get_contents locally but to get the result html/xml rather than the file itself.
#1

[eluser]Andrew Stilliard[/eluser]
Hi,
i need to find a php core function, or even one built for/into CodeIgniter, that would allow me to locally on a domain get the result of a php file.

The php file generates xml, its stand alone but something i built a long time ago, what it does is great but complex and working it into the new system would take too long.
Its on the same domain as the new system, just in a sub directly, and to make it more complex, the file called is for example file.xml, but actually its using .htaccess and an index .php page to run it.
Now if this file was on a different domain, i could call file_get_contents and get the file, and it would give me the result xml, but its on the same domain which would typically give me the php code, the actual file content rather than its result. but even that i could solve by using eval on it. but because this file only exists via htaccess and an index.php page i cant even do that.

Even the eval option would not be great as i may have some functions with the same names in both that file and the new project which would cause issues.

After that ramble of an explanation basically what i need is a file_get_contetns that would work as-if its the user viewing it, or as-if its on another domain.
I have tried curl requests but no such luck, so any help would be brilliant and if there is a set of curl params or stream params for file_get_contents i could use please point me in there direction.

Thanks in advance.


Messages In This Thread
Local CURL Request, or file_get_contents locally but to get the result html/xml rather than the file itself. - by El Forum - 06-09-2010, 05:38 PM



Theme © iAndrew 2016 - Forum software by © MyBB