frobak Posted November 3, 2009 Share Posted November 3, 2009 Hi Is it possible to use get_file_contents to retreive code(from the same server but different domain) without running the php code inside the included file. I want to use a local include inside the retreived contents. is it possible to stop the code running on the original server? the following code works, pulling the content from the central file: <?php $xx = file_get_contents("http://www.mkoneweb.co.uk/central_includes/test.inc.php"); echo $xx; ?></p> but i want to have a local variable inside the contents of the retreived file: <? include("includes/area.inc.php"); ?> anyway to control when this code will run? Any help would be much appreciated cheers Quote Link to comment https://forums.phpfreaks.com/topic/180132-get-file-contents-with-some-php-in/ Share on other sites More sharing options...
mikesta707 Posted November 3, 2009 Share Posted November 3, 2009 you can use regex to extract that specific line, and use eval to run it, but I would be very careful if you go this route Quote Link to comment https://forums.phpfreaks.com/topic/180132-get-file-contents-with-some-php-in/#findComment-950241 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.