I have been researching on how to call a php file located on another domain (same host server). I have added a include line to one of my websites which in turn I would like to read a xxx.php located in another domain but have not gotten it to work. I have tried the following: <?php include("/home/owernamehere/public_html/folder/callme.php");?> "<?php include ('http://www.domainname.com/callme.php') ?>" But it returns nothing. Any ideas if this is possible or if I'm missing something. Thanks.
The first one could work, however the second one would probably not work. Most hosts configure PHP to not allow includes from outsite URLs. Plus, it would be like calling it in your browser, and you would get the results instead of the actual PHP code. What is the full location of your current file that has the include on it? Most hosts configure their servers as so you cannot include files from other user accounts/domains [for security reasons, so you can't mess with other accounts]
If you're on a shared hosting, it's more likely that you won't be able to include any external file in your scripts due to security reasons.