G
Graham Mattingley
Hello Group,
I have been playing with this idea for a month or so, but never really got
anywhere....
I want to make a remote counter image, the same as is found on
mycounter.com, where people have have an IMG SRC on there page which will
increment a SQL counter on my database.
so each time there page is loaded, it get the image from my site, but also
increments a hit counter on SQL..
I have really no idea how to do this, however I need to try and do this is
ASP, not CGI or anything like that, as I will never understand it
what I have tryed so far is streaming the image which I can do, but I dont
know how to pass the varable from the IMG SRC to the server..
I know this is not the answer but I want to try and do something like this
how can I pass the for example ?ID=123 value to be grabbed in the page on my
site
<img border="0"
="http://www.mysite.com/counters/index.asp?id=123"> ----------- on remote
site
<============ WITH THIS CODE ON MY SITE======(index.asp)=======>
response.contenttype="image/gif"
response.binarywrite getBinaryFile(server.mappath("../images/car.jpg"))
' ////////// how can I grab the value of the ID on the remote IMG SRC
response.write querystring("id")
' /////////////////////////////////////////////////////////////////////////
function getBinaryFile(fileSpec)
Dim adTypeBinary
adTypeBinary = 1
Dim oStream
set oStream = server.createobject("ADODB.Stream")
oStream.Open
oStream.Type = adTypeBinary
oStream.LoadFromFile fileSpec
getBinaryFile= oStream.read
set oStream=nothing
end function
If I have gone on totally the wrong track, any other ideas would be very
very welcome, as I need to get something running asap..
Kind Regards
Graham Mattingley
I have been playing with this idea for a month or so, but never really got
anywhere....
I want to make a remote counter image, the same as is found on
mycounter.com, where people have have an IMG SRC on there page which will
increment a SQL counter on my database.
so each time there page is loaded, it get the image from my site, but also
increments a hit counter on SQL..
I have really no idea how to do this, however I need to try and do this is
ASP, not CGI or anything like that, as I will never understand it
what I have tryed so far is streaming the image which I can do, but I dont
know how to pass the varable from the IMG SRC to the server..
I know this is not the answer but I want to try and do something like this
how can I pass the for example ?ID=123 value to be grabbed in the page on my
site
<img border="0"
="http://www.mysite.com/counters/index.asp?id=123"> ----------- on remote
site
<============ WITH THIS CODE ON MY SITE======(index.asp)=======>
response.contenttype="image/gif"
response.binarywrite getBinaryFile(server.mappath("../images/car.jpg"))
' ////////// how can I grab the value of the ID on the remote IMG SRC
response.write querystring("id")
' /////////////////////////////////////////////////////////////////////////
function getBinaryFile(fileSpec)
Dim adTypeBinary
adTypeBinary = 1
Dim oStream
set oStream = server.createobject("ADODB.Stream")
oStream.Open
oStream.Type = adTypeBinary
oStream.LoadFromFile fileSpec
getBinaryFile= oStream.read
set oStream=nothing
end function
If I have gone on totally the wrong track, any other ideas would be very
very welcome, as I need to get something running asap..
Kind Regards
Graham Mattingley