|
-
Nov 29th, 2001, 05:32 AM
#1
Thread Starter
Frenzied Member
Anybody want the scripts for my time display?
You'll need an ASP host to run it on
-
Nov 29th, 2001, 10:02 AM
#2
Thread Starter
Frenzied Member
Oh well,
Looks like the answer is "no"
-
Nov 29th, 2001, 10:05 AM
#3
-
Nov 29th, 2001, 10:07 AM
#4
Member
I'm sure interested in how you do it, and I have an ASP host :-D If you could send it to me, would be greatly appreciated.
-
Nov 29th, 2001, 10:24 AM
#5
Thread Starter
Frenzied Member
okey doke!
I'll knock up some instructions...
-
Nov 29th, 2001, 10:53 AM
#6
Hyperactive Member
I already have them. Thank you very much!!!!!!!!!!!!! *smooch*
-
Nov 29th, 2001, 11:24 AM
#7
Thread Starter
Frenzied Member
OK
Here it is:
localtime.asp
usage:
localtime.asp?offset=< number of minutes>
in your VBWorld profile put

Code:
<%@ Language=VBScript %>
<%
Dim offset
Dim t
Dim strPath
strPath = 'http:// url To your image directory
offset=request("offset")
t = dateadd("n",offset,time())
response.redirect strPath & hour(t) & "_" & minute(t) & ".gif"
%>
servertime.asp
this file just returns the current time at the server to make it easier to calculate the required offset
Code:
<%@ Language=VBScript %>
<%
response.write "The current time On this server is: " & time()
%>
settime.asp
this file calculates the offset for you
it may or may not work 
Code:
<%@ Language=VBScript %>
<html>
<script language='javascript'>
var sh =<%=hour(time())%>;
var sm = <%=minute(time())%>;
var now = New Date();
var ch = now.getHours()
var cm = now.getMinutes()
var min=((ch-sh) * 60) + (cm - sm)
document.write("Use this URL:<BR>");
document.write("<b> <b>")
</script>
I used 1440 small gif images, one for each minute of the day.
These have the file name of the format <hour>_<minutes>.gif
Eg: 1_10.gif
I created these using this VB code:
Code:
Private Sub Command1_Click()
Dim i As Integer
Dim j As Integer
Dim f As String
For i = 0 To 23
For j = 0 To 59
Picture1.Cls
f = i & "_" & j & ".bmp"
Picture1.Print Format(i, "00") & ":" & Format(j, "00")
SavePicture Picture1.Image, "c:\time\" & f
Next j
Next i
End Sub
Private Sub Form_Load()
Picture1.AutoRedraw = True
Picture1.FontTransparent = False
End Sub
I then converted then all from bmp to gif using the batch conversion facility in Paint Shop Pro 5
I then FTPed them all to the server
I had to use a different server because my ASP host won't allow direct linking of images.
For the days it's basically the same:
localday.asp
Code:
<%@ Language=VBScript %>
<%
Dim offset
Dim t
Dim strPath
strPath = "http://url of your images
offset=request("offset")
t = dateadd("n",offset,now())
response.redirect strPath & "DAY_" & weekday(t) &".GIF"
%>
the vb to create the images:
Code:
Private Sub Command1_Click()
Dim i As Integer
Dim f As String
For i = 1 To 7
Picture1.Cls
f = "day_" & i & ".bmp"
Picture1.Print Format(i, "dddd")
SavePicture Picture1.Image, App.Path & "\" & f
Next i
End Sub
Private Sub Form_Load()
Picture1.AutoRedraw = True
Picture1.FontTransparent = False
End Sub
Have fun!
-
Nov 29th, 2001, 12:09 PM
#8
Fanatic Member
Hey, who needs an ASP host when they can steal Mark's?
What do you think: does it suit me?
-
Nov 29th, 2001, 10:01 PM
#9
Hyperactive Member
Originally posted by Mark Sreeves
OK
Here it is:
....
I then converted then all from bmp to gif using the batch conversion facility in Paint Shop Pro 5
I then FTPed them all to the server
I had to use a different server because my ASP host won't allow direct linking of images.
...
Have fun!
CHEERS !!! mark..though I choose to use it in another website.
-
Nov 30th, 2001, 03:01 AM
#10
Thread Starter
Frenzied Member
Originally posted by InvisibleDuncan
Hey, who needs an ASP host when they can steal Mark's?
What do you think: does it suit me?
I hope it doesn't break the server 
I think I'll have to put a hit counter in the scripts to see just how mant times they are being called.
Originally posted by thinktank2
CHEERS !!! mark..though I choose to use it in another website.
PLEASE DO!
-
Nov 30th, 2001, 06:06 AM
#11
Thread Starter
Frenzied Member
I put some logging in my scripts and I'm getting about 100 hits per hour at the moment.
This figure will probably go through the roof when Katie wakes up
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|