![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Web-Based Adult Content Server 0.7.4 (PHP branch) | iBot | Software Releases - RSS News | 0 | 02-25-2008 12:40 PM |
| Installing HP-UX o a windows based server | AshkA | HP-UX | 4 | 12-23-2007 11:20 AM |
| including shell env variables into C code | bdsffl | High Level Programming | 4 | 01-26-2007 01:06 PM |
| SSH key code versus server key code | Texan | Security | 1 | 04-12-2006 08:57 AM |
| MAC OSX and UNIX server based software | kaye32608 | OS X (Apple) | 6 | 11-16-2003 02:23 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
server based Including additional code > Lycos way
For a project we need to make sure that all php / html files in a certain directory on the webserver are showing advertisments of us.
For example, when you get a website from Lycos, you'll have an advertisement in the right corner. How to? As far as I can see, Lycos includes a javascript at the bottom of each page, but how? Through .htaccess? Solutions are welkom, but think of the idea that the ones who can edit the files (php and html) are not allowed to remove the adviertisment! So it must be hidden. We are thinking of a solutions in which each file requested from the server is parsed by a mailfile locate in the root. This file in the root will first include the file requested and then a code for the advert. We thought we had it: RewriteEngine on RewriteCond %{REQUEST_FILENAME} .\.php$ RewriteRule ^(.*)$ advert.php3?url=$1&string=%{QUERY_STRING} but including an action at the end doesn't work at all. This is no solution. What we want is to read the pages from te server and add an additional code at the bottom of every html/php file. RewriteRule ^(.*)$ advert.php3?url=$1&string=%{QUERY_STRING} In advert.php3 we try to include the original requested url and the QUERY_STRING, but 'join', 'include' and 'require' will not do so. (frameset is also no solution) Please, any help is welcome... Last edited by valentijnb; 07-05-2003 at 08:55 AM. |
| Forum Sponsor | ||
|
|
|
#2
|
||||
|
||||
|
The PHP command include based on certain logical conditions seems to work.
|
||||
| Google The UNIX and Linux Forums |