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 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 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
Archived
This topic is now archived and is closed to further replies.