Welcome to WebmasterWorld Guest from 34.237.76.91

Forum Moderators: open

Message Too Old, No Replies

How to make an adwords type include without js

javascript adwords include

     
5:35 am on Feb 5, 2004 (gmt 0)

New User

10+ Year Member

joined:June 13, 2003
posts:19
votes: 0


I want to have an included file on a few clients sites that doesn't use js, iframe or shtml/other scripting language. Basically I want to have an adwords type html box can be embedded on different sites that google can follow, and that lives at a remote location.

Is this possible? ideas?

Thanks.

5:41 am on Feb 5, 2004 (gmt 0)

New User

10+ Year Member

joined:June 13, 2003
posts:19
votes: 0


Thinking more about this, I would really like the content to be parsed into the page as it would with a php include(). I just want to avoid having to work with multiple scripting and hosting setups.

<!--#include file="college.html" -->
^^^this type of include would be fine, but often won't work unless you rename page to shtml. Something like it though?

8:52 am on Feb 5, 2004 (gmt 0)

Preferred Member

10+ Year Member

joined:Aug 7, 2003
posts:408
votes: 0


The <!--#include file="college.html" --> command can only access files that are located on your local system, not on another server.

I think the best solution is to use an iframe.

FYI: Google Adsense uses an iframe to display Adwords.

8:55 am on Feb 5, 2004 (gmt 0)

Senior Member

WebmasterWorld Senior Member tedster is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:May 26, 2000
posts:37301
votes: 0


Wow, you've just mentioned and ruled out every technology I can think of that allows you to update only one file and then import/include it on more than one page.

Javascript
PHP
SSI
iframe
frame

I think these are your options.

9:14 am on Feb 5, 2004 (gmt 0)

Preferred Member

10+ Year Member

joined:Aug 7, 2003
posts:408
votes: 0


seoer, here's an example of an iframe:

<iframe src="http://www.mydomain.com/insert.html" width="450" height="65" scrolling="no" frameborder="0"></iframe>

I hope tedster will post his solutions too ;-)

8:14 am on Feb 11, 2004 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:July 4, 2001
posts:997
votes: 0


actually, a php include() statement will work with remote urls given certain specific security settings on the local machine.

You can get around the extension setup through the use of index.php's where the filename/extension doesn't show, or through the use of .htaccess to set arbitrary extensions to be php executed. For example, on most of my websites .htmls are php executed and .htm are pure html.

3:41 pm on Feb 11, 2004 (gmt 0)

Full Member

10+ Year Member

joined:Sept 22, 2003
posts:225
votes: 2


Suprised you don't want to consider SSI. You could still set the servier to parse .htm or .html files as dynamic...
12:58 am on Feb 12, 2004 (gmt 0)

New User

10+ Year Member

joined:June 13, 2003
posts:19
votes: 0


SSI seems to be the best way to do this, but it doesn't seem possible to include remote (off server) files. Well there seems to be some conflicting information out there at least.
2:13 am on Feb 13, 2004 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Apr 19, 2003
posts:1747
votes: 0


You can handle this with Dreamweaver's .lib files - if you have $500 to blow on a so-so editor....
1:12 pm on Feb 13, 2004 (gmt 0)

Preferred Member

10+ Year Member

joined:Jan 29, 2002
posts:423
votes: 0


I want to have an included file on a few clients sites that doesn't use js

What do you mean "that doesn't use js"? Your included file must not use JavaScript? Why?

JavaScript as a client-side scripting language is supported by most browsers.

I doubt that any SE will index JS-generated content though.

5:27 pm on Feb 13, 2004 (gmt 0)

New User

10+ Year Member

joined:June 13, 2003
posts:19
votes: 0


I don't want to use JS because SE's (google) wouldn't pick up any of the links created by document.write. They would be visable to a user, but not to a bot. This is the reason why adsense won't get counted as a backlink.

Does anyone know if this can be made to work?

<!--#include virtual="http://www.mypage.com/content.html" -->

6:44 pm on Feb 13, 2004 (gmt 0)

Preferred Member

10+ Year Member

joined:Jan 29, 2002
posts:423
votes: 0


Then you'll have to generate content on the server side. Look for remote includes.

I don't know about SSI, but with PHP you can use readfile [php.net], e.g.:

<?php readfile("http://example.com/somefile.inc");?>

<added>Are you trying to sell PageRank(tm) [google.com]? Not a very successful business strategy IMHO. ;)</added>

 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members