dj-kenpo Posted May 17, 2007 Share Posted May 17, 2007 I'd like to include a file but the include command won't work cross server (not on my server anyways) and I just want the rendered html anyways. is there a way that I can grab the html and output? I'd liek to avoid curl as it's a high traffic site and I imagine it eats more cpu. basicly I want to create a file pointer eg page.php <? $Get_string = $_SERVER['QUERY_STRING']; include("example.com/user_pages/page.php?$Get_string"); ?> except obviously the above doesn't work as include hates get variables. any help loved. Quote Link to comment Share on other sites More sharing options...
cmgmyr Posted May 17, 2007 Share Posted May 17, 2007 you could use "header" and just re-direct to that page Quote Link to comment Share on other sites More sharing options...
dj-kenpo Posted May 17, 2007 Author Share Posted May 17, 2007 no, I need the person to stay in their local directory and not get transfered elsewhere. but it was a good idea. mysite.com/page.php grabs example.com/user_pages/page.php but no one knows it occured. I don't want to have to update the same file 600 times for different members. nor do I want the file space issues. easier to just refrence the same file with a sort of shortcut. make sense? at all...? Quote Link to comment Share on other sites More sharing options...
cmgmyr Posted May 17, 2007 Share Posted May 17, 2007 you could add it to a session or a cookie then when you include the file it will grab the session data Quote Link to comment Share on other sites More sharing options...
travelerBT Posted May 17, 2007 Share Posted May 17, 2007 try the file_get_content, reads the file into a string, and you can spit it out. http://us.php.net/manual/en/function.file-get-contents.php good luck! Quote Link to comment Share on other sites More sharing options...
dj-kenpo Posted May 17, 2007 Author Share Posted May 17, 2007 file_get_contents seemed like a great idea, I'm on dreamhost and got this "URL file-access is disabled in the server configuration" anything else I can do? Quote Link to comment Share on other sites More sharing options...
Orio Posted May 17, 2007 Share Posted May 17, 2007 Use the cURL library. Orio. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.