elias Posted March 2, 2007 Share Posted March 2, 2007 hi guys and gals! I have 20 domains which (to make life simpler) all share the same template pages and data base which reside in another domain. Since changing server, I have found that my pages that used to load at normal speeds are now taking 20-40 seconds (completely unacceptable ) I have narrowed down the problem to this one line: include("http://www.mydomain.com/template.php?site_id=$site_id"); where $site_id are my 20 domains - eg: ItemA, ItemB, etc. Basically my 20 index pages sit in their own domains and call my templates which reside in www.mydomain.com It used to work, but now as I said, it takes forever to load, and I know this is the culprit because if I just call http://www.mydomain.com/template.php?site_id=ItemA from my browser it comes back instantly. Any ideas...... I have tried include and require, but it does not seem to make a difference (and by the way, what are the difference between these two commands) Anyhow, any pointers would be greatly appreciated!!! cheers and have a nice weekend elias Link to comment https://forums.phpfreaks.com/topic/40936-solved-problem-with-includehttpwwwmydomaincomtemplatephp/ Share on other sites More sharing options...
Jessica Posted March 2, 2007 Share Posted March 2, 2007 You can't include urls with query strings. Link to comment https://forums.phpfreaks.com/topic/40936-solved-problem-with-includehttpwwwmydomaincomtemplatephp/#findComment-198231 Share on other sites More sharing options...
elias Posted March 2, 2007 Author Share Posted March 2, 2007 hi jesirose Thanks for your input, but how do you think I could achieve the desired effect - it must be possible. I want to have a template sitting in domain A with a database linked to it, and then I want 20 other domains, B, C, D, etc. elsewhere to all be able to call on this template so I dont have to have 20 pages and 20 data bases - there must be a way, right? cheers elias Link to comment https://forums.phpfreaks.com/topic/40936-solved-problem-with-includehttpwwwmydomaincomtemplatephp/#findComment-198240 Share on other sites More sharing options...
linuxdream Posted March 2, 2007 Share Posted March 2, 2007 Could use fopen...http://us2.php.net/manual/en/function.fopen.php for a quick and dirty way of doing it. Or file_get_contents for an even simpler way...http://us2.php.net/manual/en/function.file-get-contents.php (no file handles or anything). Link to comment https://forums.phpfreaks.com/topic/40936-solved-problem-with-includehttpwwwmydomaincomtemplatephp/#findComment-198252 Share on other sites More sharing options...
elias Posted March 2, 2007 Author Share Posted March 2, 2007 excellent guys/gals! thanks, that gives me a few options to work on. take care and have a nice weekend! elias Link to comment https://forums.phpfreaks.com/topic/40936-solved-problem-with-includehttpwwwmydomaincomtemplatephp/#findComment-198256 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.