Are you a Google Analytics enthusiast?
Share and download Custom Google Analytics Reports, dashboards and advanced segments--for FREE!

www.CustomReportSharing.com
From the folks who brought you High Rankings!
More SEO Content
What's The Best Include Method?
#1
Posted 27 November 2004 - 10:27 AM
I want to start adding my template to many 3rd party sites and portals. If I do this I have to upload/insert a static copy of my template, because of course I can't use the php includes on sites/pages that aren't on my server. Therefor, every time I modify/add to/change my template, I have to spend a LONG time modifying every 3rd party version - and it's giving me the IRRITS!
I could use Iframes, because search engines can find them, and I can block the search engines from listing the actual contents of the Iframes, and I can make them but of course this is messy and very unprofessional, and there are several unsavory problems Iframes cause that can't be fixed.
I could use Javascript, but yeah, we're in 2004 now (almost 2005). Also, using Javascript will do jack for my SEO efforts.
That leaves me with XML. However, how on earth can I get a .php page to use/parse .xml?
I have tried to find this out before, I have spend many hours searching the Internet for ways to make some sort of include system for xml/php. I have had limited success, but to be quite honest it's all very confusing for me.
I tried building my site with XML, but when my server wouldn't parse it (after the days I spent "straight" learning how to make an XML page) I totally gave up.. very angry. Ok, so I work out how to make my server parse xml? What of the 3rd party servers can't parse xml? Sheeesh, web design can get annoying!
Also, some of the 3rd party sites are .asp!
So, this is really hard for me to figure out.
Maybe xml isn't the answer. But how on earth can I include content in a 3rd party site without using Iframes or Javascript?
If someone can tell me a way to do this without having to study something for 3 weeks straight, you'll become my hero!
MrLeN
#2
Posted 27 November 2004 - 11:10 AM
You update that one file and it automagically updates the display on every site that accesses that file.
Don't be telling everybody that though. Because I don't want to start seeing my entire site end up on someone else's domain.
#3
Posted 27 November 2004 - 01:17 PM
Randy just echoed my answer. It's definitely doable
#4
Posted 27 November 2004 - 11:27 PM
ALL this time???
Going to test..
MrLeN
#5
Posted 27 November 2004 - 11:39 PM
YEP, YOU'RE MY HERO!
How on earth didn't I know that? I am absolutely positive that I wanted to do this previously, but was told that it couldn't be done. Is this a new php thing? ie: Something that was added in the last year or so?
I am extremely happy
Thank you!!
*Goes off to S&R all templates*
MrLeN
#6
Posted 27 November 2004 - 11:47 PM
One third party site is in .html and another is in .asp - lol
Uh, I don't suppose there's any chance I can get such pages to parse php?
MrLeN
#7
Posted 28 November 2004 - 12:29 AM
I tested the include on a page and it worked fine, but when I tried to use it on a third party portal/template, the page wont load.
I am guessing that it's because the actual page starts with
<?
and ends with
?>
and my content is in between, so I can't use:
<? include("http://www.mysite.co...es/include.php"); ?>
How would I format the above line in such a case?
I am currently searching the net, trying to find out how, but not luck yet.
MrLeN
#8
Posted 28 November 2004 - 12:44 AM
One third party site is in .html and another is in .asp - lol
Uh, I don't suppose there's any chance I can get such pages to parse php?
MrLeN
I don't know how new it is, but I've known about it for a while...
If you are trying to include an html or asp page inside php, it should work.
If the entire page is surrounded by <? ?> , then yes you will have to strip them from the include, so
should do it..
#9
Posted 28 November 2004 - 01:04 AM
I actually want to go the other way around. I want to know if there is any code that I can use to call php from a .html page or an .asp page.
I just tried this.. All it does it display the actual code. ie: Just as if it was a line of text.
MrLeN
#10
Posted 28 November 2004 - 01:53 AM
<!--#INCLUDE FILE="header.asp"-->
For html pages, you can parse the html code as php if you are on a nix server.
#11
Posted 28 November 2004 - 02:25 AM
#12
Posted 28 November 2004 - 04:10 AM
On the third party site are you just wanting to put the same page page directly on the server and have it run or can it be a remote include ?
is there any php executable code in the include or is it simply html?
does the html site support SSI at all?
#13
Posted 28 November 2004 - 09:34 AM
one site is in PHP, so I can use PHP includes (which I haven't got working yet, even so).
One site is in static HTML pages (generated by Perl, I believe).
One site is in .asp
In all three of these sites, the only way I have to get my template uploaded is by cutting and pasting a copy of my template header and footer into a text area.
What makes it harder is that one of the 3rd party sites wont let me cut my whole header and footer. They have a different text area for each part of the template, so that people's code fit's in with the way "they" want their site structured.
I don't mind using SSI as well as PHP includes, just as long as I don't have to keep going back to change the templates.
If I can work out how to pull content from MY server, I intend on making use of many more 3rd party content/service providers for use with my template, but not if I have to change every single template, every single time I change something.
MrLeN
#14
Posted 28 November 2004 - 10:16 AM
You could try seeing if the server is configured so that it will allow you to tell it that you want html files pre-processed by php. It may or may not work, depending upon the server's configuration.
To do that you would stick the following in an .htaccess file at the root level.
If it works, you can then put php code into your html pages and they'll run just as if they were php. That's going to be a pretty dicey proposition if you try to expand it out to other third party sites though. Some servers will allow it and just as many or more won't.
I'll leave ASP ideas to Chris. He's a lot more familiar with what it can and can't do than I am.
#15
Posted 28 November 2004 - 10:24 AM
Sigh.. thinks.. taps fingers..
I don't want to have to use Iframes...
I suppose I could make an Iframe call the same documents that my includes are calling for the third party environments, and just use includes for pages that reside on my server.
However, I'd have to have a CSS reference at the top of every include file. That would kinda suck. But at least.. if I change the include, every site will be updated, no matter how many servers my template is spread across.
I think I'll just put this in the too hard box and come back in a year or two. Maybe something will have been invented by then.
MrLeN
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users








