#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2000
    Posts
    19
    Rep Power
    0
    I am building an advertisement management system and need advices on how to implement that.

    A basic description would be: a webmaster registers, gets a peace of html that is to be inserted in a webpage; I want to be able to monitor the number of impressions, the number of unique clicks, and be able to give stats per day.

    For the unique clicks, I am thinking using cookies and storing the user's IP address.

    For the other two features, I need advices.

    How do I monitor the number of impressions of my banners? I still have no clue. I thought about having a php script reading an image on my server and returning it to the screen and have them put something like <img src="thescript.php3">, the problem with that s that if this is not included on the page but the link through is, it messes up my cilck/impression ratio, and I thing this will be heavy on my server, wouldn't it?. I am trying not to depend on Server Side Include. Please help me on that one .

    Keeping track of what is happening per day? There are thousands of ways to do that. I would like to know what would be the most efficient way to implement that. I was thinking of having a table username|impressions|clicks|date with username|date being my key. What do you think?

    One more question, How heavy do you think this is going to be on my server?

    Thanks in advance for your help,


    Bakassi
    (Who is happy there is a place in the world like devshed where you can find help from great people )
  2. #2
  3. .Net Developer
    Devshed Novice (500 - 999 posts)

    Join Date
    Feb 2000
    Location
    London
    Posts
    987
    Rep Power
    15

    <<
    I want to be able to monitor the number of impressions, the number of unique clicks, and be able to give stats per day.
    For the unique clicks, I am thinking using cookies and storing the user's IP address.
    >>

    Yea,This is very interesting topic for me now.becoz i'm developing an affiliate program similar to this in perl.

    we can implement this in different ways..
    what i'm planning to do is that after webmasters registering i'm going to generate an id(userid---you have already that) for that webmaster, plus i'll be giving him some html code.
    that might be something like...

    <a href="bannerscript.php?userid=30"><img src="yourgif.gif"></a>

    after this taking impressions and clickings are very easy.i'm not going to use
    cookies for tracking multiple click..

    probably i may restrict the multple click updation with HTTP_ADDR variable and the current date.


    <<
    username|impressions|clicks|date
    >>

    I think you may need to include one more coulmn in this table..

    i would suggest to include a field called users_remote_addr for tracking the user..so
    you can restrict multiple clicks and impressions..

    ok... smart way to implement this very quickly is that just see some free scripts..
    and steel some ideas from that...

    actully this is my initial thinkings i'll have to spend some free time for finding out a best logic for this...



    ------------------
    SR -
    webshiju.com
    www.jobxyz.com-IT Career Portal
    ezipindia.com--WebStudio


    "The fear of the LORD is the beginning of knowledge..."

    [This message has been edited by Shiju Rajan (edited September 19, 2000).]
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2000
    Posts
    79
    Rep Power
    15
    Have a blank page with the banner inside for ppl to load. Get them to put userid=number on the end of the url. Then on that page have a mysql update query like..

    UPDATE table set impressions=impressions+1 where userid=$userid
    and the following for the image
    <a href=click.php?userid=$userid><img src=$banner></a>

    Now, for click.php, make a page which looks something like this..

    mysql_query("UPDATE table set clicks=clicks+1 where userid=$userid");
    Followed by a mysql select statement to get the link destination for $banner...or, you could get it at the same time as you get $banner and pass it on thru the url, up to you.
    header("Location: $row->link");
    exit;

    You will obviously need to make changes to the code above and add stuff to suit you.

    Basil

    [This message has been edited by 'tantrum (edited September 19, 2000).]
  6. #4
  7. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2000
    Posts
    19
    Rep Power
    0
    Thanks guys for your inputs.

    I still have the problem of monitoring the number of impressions to the screen. The codes you entered above would take care of the number of clicks, but not the number of impressions, would they? Basecally I need to have way of counting how many times my banner is showed on the screen. Do you thing that having a php script with gif return type that reads from a banner on my server and returns it to the screen would do the trick? But this is going to kill my resources as I basecally have an image generated every single time a page is loaded .

    Please let me know what you guys think.

    Is there anyway with html to imbed the output of a php script without using SSI?

    Thanks in advence.


    Bakassi
    (Who is glad you took some time to help him out )


    [This message has been edited by bakassi (edited September 19, 2000).]
  8. #5
  9. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2000
    Posts
    79
    Rep Power
    15
    My post tells you how to count impressions. Read over it again
  10. #6
  11. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2000
    Posts
    19
    Rep Power
    0
    Thanks for your help Tantrum, that solution would need them to laod my script with a frame or ssi or something of that knid. I found a solution playing with headers and inserting my scipt with <img scr="test.php3">.

    [This message has been edited by bakassi (edited September 20, 2000).]

Similar Threads

  1. How to resize frame according to screen resolution???
    By skuba in forum HTML Programming
    Replies: 10
    Last Post: January 5th, 2004, 06:51 PM
  2. Some help with screen please
    By JosephB in forum Linux Help
    Replies: 1
    Last Post: November 1st, 2003, 01:00 PM
  3. Right justify new window regardless of screen resolution
    By UncleMole in forum HTML Programming
    Replies: 4
    Last Post: August 19th, 2003, 07:08 PM
  4. on the fly screen resolution detection
    By n0_cArR1eR in forum PHP Development
    Replies: 2
    Last Post: July 3rd, 2002, 08:31 PM
  5. Full screen video in a full screen site
    By SuperFlu in forum HTML Programming
    Replies: 1
    Last Post: February 20th, 2002, 06:37 PM

IMN logo majestic logo threadwatch logo seochat tools logo