Cyberpunk
03-27-2002, 09:28 PM
Basically the top/bottom or whatever banners that free hosts automatically work into pages when theyre uploaded or viewed from their servers.
How is this done? I've been trying to findout out of curiosity for ages but have drawn a total blank.
Any information would be much appreciated.
Thanks.
El Nino
03-27-2002, 11:25 PM
I think I lot of times it's developed in-house. Mod Layout (http://software.tangent.org/projects.pl?view=mod_layout) is an Apache mod that should do what you're looking for.
prosayist
03-28-2002, 12:16 AM
:uhh:
.. something with "prepend" in .htaccess?
prosayist
03-28-2002, 04:02 AM
like so:
http://www.zend.com/zend/tut/banner.php
Originally posted by prosayist
like so:
http://www.zend.com/zend/tut/banner.php
thats only in php files
NetGeek
03-28-2002, 12:25 PM
I think most of these hosts don't allowe to directly ftp your file to their servers. You have to upload them via some kind of file manager script which adds the banner inclusion code on the fly..
Just my 0.02$
AA
IceBlaZe
03-28-2002, 12:32 PM
What about HyperMart A A?
HyperMart and a lot of other free hosts has banners included on show ups...
I don't think it changes code on the fly, server must add code to the top of every page when the browser does the HTTP request.
gnorthey00
03-28-2002, 01:08 PM
My understanding (from GeoCities.com) is that some apache module is used to change code on the fly.
I could ftp, use an on-site editor, or do whatever to get the site on their server, but as soon as an HTTP request comes in asking for xxxxx.html, the server selects a file and appends it to your file as it loads.
Whether or not that is still true of GC or other hosts, I do not know.
Cyberpunk
03-28-2002, 03:30 PM
Great info folks.
I think the theory that its done on the fly or the pages are rewritten on the server is the most likely, as I've seen it done on servers where you can ftp up files using your own ftp clients. And when ftp'd back down the files are just as they were when they went up.
Ive heard of a rewrite rule or whatever the term is using htaccess, it would be simple and effective. Would love to know how its done. Basically I heard that the server parses the document for recogniseable tags and replaces the code, eg. looking for <body> </body> etc.
Anyone know more?
BenEDH
03-28-2002, 05:18 PM
well, the ones that show ads in frames are really simple
what you do is, make a user, and give him access to a directory, then in the directory that has his directory, make an index file that has a frame on the bottom, and then the other frame goes to /hisdirectory/index.html/
--------------------------------------------
-index.html (framset page)
-bottomad.html (bottom ad frame)
-/hisdirectory/
-+index.html (page that shows up in the browser)
--------------------------------------------
its very simple :)
Cyberpunk
03-28-2002, 07:16 PM
Sounds quite simple.
I'd still love to know the methods for inclusion of banners etc. into actual pages though :)
Its more for curiosity than anything else.