<? include('http://www.host/page.php');?> Code (markup): It returns a "Temporary failure in name resolution" so I cannot use php include. Is there any piece of code I can use to check if include is possible and if it is, include, else do something else? I know I can use iframe, but I am willing to code it with PHP. Thanks.
Does this page contain PHP scripting from another host? mostly hosts doens't allow those scripts. If not, you can use readfile or other ways to read external files.
there is no way to read external files if it's a internal file you should do like this <? include('http://www.host.com/page.php');?> Code (markup):
Is this file on your server or on a different server? if it's on your server, you should use something like include '/home/username/www/path/to/file/file.php'; PHP: if you are wanting to read the contents of another sites page, use $content = file_get_contents('http://www.site.com/page.php'); PHP:
you should use the full local path as in /home/public_html/../../file.php because if you do it using a URL you will be using another apache thread when you dont heed to. you will probably also need to enable open basedir in php.ini