Includes across different servers
Is there any way to do what is effectively a server side includes but on a different server?
include("http://domain.com/folder/filename.inc"); ?>
Hope that helps.
Aaron - thanks for the heads up on .htaccess parsing .shtml for PHP, I'll look into setting that up. Do you know how much if any extra overhead this causes? Also, couldn't we use .htaccess to map several of our high traffic .shtml pages to redirect to .php versions? If so is would this be a better performance solution than double parsing .shtml and .php?
I would really like it if someone would come up with a way to incorporate ActiveThreads into vB postings.php. That way lastposts.inc would be updated real time each time a visitor posts and a cronjob would not be required on the vB site to update the lastposts.inc file.
Ideally I would like to see ActiveThreads incorporated into vB with two additional templates added to vB. One template would be for the main ActiveTreads page display and the other would be for the include file.
The way this would work is when someone posts or replies both the ActiveThreads HTML page and the ActiveThreads include file would be written to files. This way when someone viewed the ActiveThreads there would be *no* connection to the DB at all. As we all know there are far more views than posts.
Check here for an example:
http://www.makeitsimple.com/
#!/usr/bin/perl
use LWP::Simple;
print "Content-type:text/htmlnn";
$last_posts = get("http://mis-forums.com/vbbs/lastposts.inc");
$inc_dir = "/your/path/to/include_dir";
open (NEWPOSTS, ">>$inc_dir/lastposts.tmp");
print NEWPOSTS qq$last_posts;
close (NEWPOSTS);
unlink ("$inc_dir/lastposts.inc");
rename ("$inc_dir/lastposts.tmp", "$inc_dir/lastposts.inc");
exit;
A striped down copy of ActiveThreads is used to write our lastposts.inc file. If you need help with that let me know.
Cheers!
Larry
[B]Unfortunately, this doesn't help us much because the pages that we use the includes on are old .shtml pages that have pretty good search engine placement
Does php not get placed well in search engines?
that could be a problem
After reading your posts I tried an experiment, and much to my surprise using a full URL include (across domains) does work in PHP.
Unfortunately, this doesn't help us much because the pages that we use the includes on are old .shtml pages that have pretty good search engine placement. We are in the process of changing the entire site to PHP, but it will take quite a while before we can ditch .shtml totally.
Thanks for the PHP tip though... this will really make things easier down the road. Sure beats the hell out of the duel cron jobs. :)
as for the htaccess stuff, I don't really know, I just use it for Directory Index and login type stuff, anyone know any where that has all the dif things you can use htaccess for?
If you do, you can tell the server to parse .shtml files for php code. Thats what I did on my server so that I could use the familiar .html extension so that my users would be able to remember page addresses easier if they ever wanted to go straight to a certain page... I memorize page addresses often so that I can check back later, I don't know how many other people do this, but having familiar extensions makes the memorization process easier.
Kinda got off topic, but it is possible to configure your server to parse your .shtml pages for php code.
like
virtual("http://www.domain.com/path/to/file.inc");
It is possible to use the .htaccess to redirect your .shtml pages to .php pages, and would probably help you with the transition from .shtml to .php, but just converting all of the code in your .shtml pages to php code would essentially do the same thing, it's basically just a matter of personal preferance. And about double parsing shtml and php, I would advise against mixing regular server side includes and php code in the same page.
Here's a link to a similar topic on the forum, it answers a lot of questions on the subject and is worth a look.
http://www.vbulletin.com/forum/showthread.php?threadid=1811
Feel free to contact me via email or icq if you have any questions, or just stick with the forums if ya want, I'll be checking back.
[Edited by Aaron on 08-10-2000 at 05:31 AM]
#If you have any other info about this subject , Please add it free.# |

