Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


Need a good download counter

 
Logged in as: Guest
arrSession:exec spGetSession 2,3,480
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> ASP >> Need a good download counter
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 Need a good download counter - 11/9/2001 4:03:09 PM   
  Ex-D

 

Posts: 1
Score: 0
Joined: 11/9/2001
From: United Kingdom
Status: offline
The download counter should:

* Accept the download title(ID) from the URL

* Record the server data and time for that download (and what file it was)

* Redirect to the file.

* Work on brinkster

Here is what I have patched together (but it didn't work (I am a newbie to ASP (But not VB!)))...

<%@ Language=VBScript %>
<%

'Dim strURL As String

'Store the variable to name. txtnameadd is the text box in index.htm
'If you study the HTML code of it you will understand
'Request.form function request the value from the form.
'name = server.HtmlEncode(request.form("txtnameadd"))

'Create object. In this case Connection to a database
Set Conn = Server.CreateObject("ADODB.Connection")

'Select provider
Conn.Provider = "Microsoft.Jet.OLEDB.4.0"
'Select data source.
'Server.MapPath function is equivalent to app.path function of VB
'It returns the directory in which the script is present
Conn.ConnectionString = "Data Source=" & Server.MapPath ("\exd\db\data.mdb")
'Open the connection
Conn.Open

Select Case request("title")
Case "ComputerControl"
strURL = "http://www.ex-d.net"

Case "MouseWrap"
strURL = "http://www.mural-ssigns.co.uk"


End Select


'Create recordset
Set Rs = Server.CreateObject("ADODB.Recordset")
'Open recordset with the connection which we have created earlier
'you must be familiar with SELECT statement ,
'If not check my VB tutorial section.
Rs.Open "SELECT * from users", Conn, 1,3

'Add a blank record
Rs.addnew
'Store date to
Rs(request("title")) = "testing"
Rs.update



'Deinitialize the Connection and Recordset
set Rs = nothing
set Conn = nothing

Response.Write "redirect to:" & strURL

%>
 
 
Post #: 1
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> ASP >> Need a good download counter Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts