This is a discussion on How to include file from different server within the PHP Programming forums, part of the Web Development category; Hi, I have a file named test1.php in server 1, and another file named test2.php in server 2, ...
| |||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
| |||
| There are possibilities to achive this, but they imply so much work that it'd be much easier to have a cron job on server 2 checking last modified date of file2 and upload the file to server 1 if it has been changed... I mean, really... In case you have a way to have the file2.php to be displayed without being parsed by the web server (which is in NO CASE secure at all), the process would be: Code: $foreignCode = implode('',file('http://www.server2.com/file2.php'));
eval($foreignCode); Finally, remember that it is a Very Bad Idea™ to have server 1 connect to server 2 every time an end-user request a page on server 1... |
![]() |
| Thread Tools | |
| Display Modes | |
| |
LinkBacks (?)
LinkBack to this Thread: http://www.discussweb.com/php-programming/1613-how-include-file-different-server.html | |||
| Posted By | For | Type | Date |
| How to include file from different server | Web Hosting | This thread | Refback | 03-05-2008 09:39 AM |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How to insert data from a csv file into a SQL server database? | $enthil | Database Support | 7 | 05-01-2008 10:45 PM |
| JavaScript to include flash file in asp.net | kingmaker | ASP and ASP.NET Programming | 3 | 03-10-2008 03:20 AM |
| How to refresh an include js file every 10 seconds? | kingmaker | HTML, CSS and Javascript Coding Techniques | 1 | 11-28-2007 11:12 PM |
| Preview Image before Uploading File to Server | velhari | HTML, CSS and Javascript Coding Techniques | 1 | 11-12-2007 10:21 PM |
| how to access local file from server? | varghese | HTML, CSS and Javascript Coding Techniques | 5 | 10-18-2007 12:15 AM |