PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
EDIT:: WE had a discussion yesterday. please refer to the 7th post (written by me) for the new question
Hi
As you may remember, i am trying to prepare something to give users a code to place on their pages to show ads. some suggested me to give them a 1*1 image so that enables me to analize their details and help me show ads. ( I know how to analize info after visitors clicked on the ads. Jus the display is a problem)
while i was thinking about this idea (using image), i thought maybe i can give them a code like:
<img border="0" src="a redirect link here.php " width="1" height="1">
and aRedirecrtLinkHere.php analizes the HTTP_referrer and help me have the ads displayed. and finally redirect to an image.
If this works, how can I settup that link and if not any suggestion or idea that works?
thanks
Last edited by m2babaey on Mon Aug 06, 2007 7:45 am, edited 2 times in total.
Dynamic how? If you don't need to put in in-context or anything, then a simple PHP file that outputs an image based on a query string and whatever else you want would work fine.
Thanks
first I want to check which site wants to display my ads. Then I search my database for that site's details like keywords. then I search my database again to find ads that meet the keywords. then the ads will be displayed.
But how to do that?
I have the database but need idea about the codes
I guess I got the solution. I give them an iframe code with a link to a php file on my site as src
The only remaining problem is that I can use http_referrer to realize from where my link has been clicked. But I need to realize where ( what domain) is asking for my php file to display the iframe. if i know that, I can analize their settings and display the ads according to their setting in my database
<?php
mysql_query ("SELECT keyword FROM table WHERE url=$url") or die(mysql_error())'
mysql_query ("SELECT ads FROM table2 WHERE keyword =$keyword ") or die(mysql_error())'
//display selected ads
?>