3rd Party Counters, How do they do that ???

G

Graham Mattingley

Hi Group,

I have been building a search engine for about 9 months now of links to
other site that I have admin Access to. This has been simple for me to keep
mySQL record of page hits, as I admin all the sites.

I now have a requirement to add 3rd party pages, that require to be able to
increment counters tables on mySQL database.

This is exactly the same requirement as other 3rd party counter web sites
offer. They seem to do it with a bit of java and an image. Unfortantly I
have no idea how it is done..

each of my search engine records has a unique ID, --------- :)

I just want for example when a 3rd party page is loaded, for it to HTTP GET
the image from my server and somehow know carry the unique ID for the
record, so when my server receives the HTTP GET for the particular image or
Javacode it can translate the sent varable so that I know what counter to
update..

This seemed easy the more I thought about it, the more I realized I did not
have a clue how to do it... The only thing is that it must not be ASP on the
client as I am not sure all of my 3rd party links have ASP. So I suppose it
must be javascript based..

Any help will be greatly appreaciated........... :)

Kind Regards

Graham Mattingley
 
R

Ray at

One would be to have the 3rd party site use an image tag with a src to an
ASP page on your site that would then stream the image back after processing
the request and updating the count. <img
src="http://yoursite.kom/counter.asp?id=TheirUniqueID">

You could then have that page execute an update on the count for that ID,
and response.binarywrite an image back. (Example, but without the
anti-leeching if/then: http://www.aspfaq.com/show.asp?id=2276)

Another option would be for you to have them load the .gif/.jpg off their
own server but then also have a 0 sized on display:none <img> that loads a
..asp page on your server that doesn't return anything, but the call would
execute the code on your server to do the update. I suppose that this could
cause some browser compatibility issues though or cause complaints from
people using your service. I don't know. But this would put less of a
demand on your server and your data transfer. I suppose an alternative
would be to use a <script src="http://yoursite..> tag though as well. It
wouldn't have to return anything still.

But, if you're hoping to get click-throughs, you'd probably want to go with
the first option to prevent people from abusing your service and not linking
to your site.

Ray at home
 
G

Graham Mattingley

Hi Ray, thanks for these ideas, I like the idea of streaming the image via
an ASP page... I will give this ago, I am having a bit of trouble with the
streaming bit at the moment, I will hopefully have something ready in afew
days, I will post back the link when I do, so you can see it

Many Thanks

Graham Mattingley
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,009
Latest member
GidgetGamb

Latest Threads

Top