Jump to content

[SOLVED] problem with include(http://www.mydomain.com/template.php);


elias

Recommended Posts

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  :P)

 

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
Share on other sites

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
Share on other sites

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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.