You'll need an ASP host to run it on
Printable View
You'll need an ASP host to run it on
Oh well,
Looks like the answer is "no" :(
not sure if i have an asp host, but ill have em anyways :)
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.
okey doke!
I'll knock up some instructions...
I already have them. Thank you very much!!!!!!!!!!!!! *smooch*
OK
Here it is:
localtime.asp
usage:
localtime.asp?offset=< number of minutes>
in your VBWorld profile put
http://www.url_of_your_asp_server_et...number_of_mins
servertime.aspCode:<%@ 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"
%>
this file just returns the current time at the server to make it easier to calculate the required offset
settime.aspCode:<%@ Language=VBScript %>
<%
response.write "The current time On this server is: " & time()
%>
this file calculates the offset for you
it may or may not work :)
I used 1440 small gif images, one for each minute of the day.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>http://www6.ewebcity.com/coolsite/lo...et=" + min + "<b>")
</script>
These have the file name of the format <hour>_<minutes>.gif
Eg: 1_10.gif
I created these using this VB code:
I then converted then all from bmp to gif using the batch conversion facility in Paint Shop Pro 5Code: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 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
the vb to create the images: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"
%>
Have fun! :)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
Hey, who needs an ASP host when they can steal Mark's?
What do you think: does it suit me?
CHEERS !!! mark..though I choose to use it in another website.Quote:
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! :)
I hope it doesn't break the server :)Quote:
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 think I'll have to put a hit counter in the scripts to see just how mant times they are being called.
PLEASE DO! :DQuote:
Originally posted by thinktank2
CHEERS !!! mark..though I choose to use it in another website.
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 :)