server based Including additional code > Lycos way


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers server based Including additional code > Lycos way
# 1  
Old 07-05-2003
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 12:55 PM..
# 2  
Old 07-05-2003
The PHP command include based on certain logical conditions seems to work.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Choosing VPN server based on server response times

Hello all, I am using the VPN provider Private Internet Access. I am using the Raspberry Pi 4 with 4GB of RAM, performance on this upgraded board is great. Anyways I am connecting to its service using systemd's openvpn-client @ US_New_York_City.service I wonder if I can create a... (5 Replies)
Discussion started by: haloslayer255
5 Replies

2. Shell Programming and Scripting

awk to print lines based on text in field and value in two additional fields

In the awk below I am trying to print the entire line, along with the header row, if $2 is SNV or MNV or INDEL. If that condition is met or is true, and $3 is less than or equal to 0.05, then in $7 the sub pattern :GMAF= is found and the value after the = sign is checked. If that value is less than... (0 Replies)
Discussion started by: cmccabe
0 Replies

3. AIX

Add additional swap place on AIX server

Can anyone help me the detailed procedure and commands to follow to add additional swap on aix server . My system shows following as of now , #lsattr -E -l sys0 -a realmem realmem 13893632 Amount of usable physical memory in Kbytes False #pstat -s PAGE SPACE: USED PAGES FREE... (7 Replies)
Discussion started by: gull05
7 Replies

4. Solaris

Server shutdown based on temperature

Working with a T5240/Solaris 10 and trying to figure out if there is a setting that will automatically shutdown the server if it hits a certain temperature. I'm just trying to identify if there is a setting in place and what that temperature is... Any help is much appreciated! (5 Replies)
Discussion started by: ojgraham
5 Replies

5. Shell Programming and Scripting

Changes in code to provide proper result with one additional fiield

Hi all I am using following code to get results for brand name drug target name and generic name from my attached fiile awk 'k>0 {if (a && k==2) {print a":"a":"a; a=a=a="";} a=a?a","$0:$0; k=0;} /^# Drug_Target_.*_Gene_Name/ {k=3;} /^# Generic/ {k=1;} /^# Brand_Name/ {k=2;} END {if (a)... (1 Reply)
Discussion started by: manigrover
1 Replies

6. UNIX for Dummies Questions & Answers

302 server status code to 301/404 server status code

Hello, Sorry for my english. I have an arcade site. mydomain.com/game.html If database has the game name is good. mydomain.com/fd43f54.html if database has not the game name redirect to mydomain.com by 302 error code. if database has not the game name i want a 301/404 error code and no... (0 Replies)
Discussion started by: hoo
0 Replies

7. Red Hat

Command to find the local harddisks of a server ? Including their size

Hi guys How do I find the harddisks in a server ? Rgds Nishant (4 Replies)
Discussion started by: thevishy
4 Replies

8. UNIX for Advanced & Expert Users

Process based code vs. Thread based code

I am just wondering on which is the best way to write programs on UNIX. Which one is better from below: a) Spawning threads per client connection/request? b) fork-exec new processes per client connection/request? Assume that I am doing some database system on linux which is supposed to run... (3 Replies)
Discussion started by: rkalyankumar
3 Replies

9. HP-UX

Installing HP-UX o a windows based server

Hello, We would like to perform tests on a product that my company created lately. We don't have the right hardware for HP-UX enviornment I've read the thred "Unix environments for MS Windows", but didn't see there a possibility to install HP-UX OS on a special compatible hardware. We've... (4 Replies)
Discussion started by: AshkA
4 Replies

10. Programming

including shell env variables into C code

Hey, I'm brushing up on C code and I'm trying to incorporate the shell environmental variables into standard ansi C code. For example I just want to do the equivalent of --echo $PATH-- and implement that in standard ansi C code. How would I do that? Thanks (4 Replies)
Discussion started by: bdsffl
4 Replies
Login or Register to Ask a Question