|
You can see how many hosts (not users) have connected to your website by looking at the log files generated by your ISP. If they don't give you log files (free ISPs usually don't) then there's not a lot you can do.
Dave.
|
|
|
|
|
You can keep a list of each active session in a database, then display that number.
Jon Sagara
"Oh Lisa, you and your lies. Bart's a vampire, beer kills brain cells. Let's go back to that building... thingy... where our beds... is."
|
|
|
|
|
For a more specific answer it depends on what your using. Ill assume its IIS and jscript.
For total number of users
try something like this in your asp file:
----------
<%
if (Application("Count") == null)
{
Application("Count") = 0;
}
Application("Count") = Application("Count") + 1;
%>
You are vistor number:
<%= Application("Count") %>
----------
For total number of visits for a specific session
try something like this in your asp file:
----------
<%
//on first visit
if (Session("Count") == null)
{
Session("Count") = 0;
}
Session("Count") = Session("Count") + 1;
%>
You visited:
<%=Session("Count")%>
----------
Hope that helped.
|
|
|
|
|
You can also count the active users browsing your site using asp. (well, sort of, the article explains the limitations of this process)
This isn't ultra-basic but it is fairly easy to understand and is a useful introduction to a couple of fundamental asp tecniques.
Take a look at: http://www.asp101.com/resources/active_users.asp
Hope that helps!
Jason Jystad
Cito Technologies
www.citotech.net
>------------------------------------------------<
"Luckily," he went on, "you have come to exactly the right place with your interesting problem, for there is no such word as 'impossible' in my dictionary. In fact," he added, brandishing the abused book, "everything between 'herring' and 'marmalade' seems to be missing."
-- Dirk Gently (Douglas Adams)
>------------------------------------------------<
|
|
|
|
|
Help! Thanks in advance!
Here is an abreviated sample of some code I am working on (I am building a HTML doc in memory and amongst other things, inserting an image within a table cell, within a row)
hr = m_pHTMLPage->createElement(bstrTag, &pElement);
hr = pElement->QueryInterface( IID_IHTMLImgElement , (LPVOID*)&pImgElement);
// src, location of image
strImage = _strImage;
bstrImage = ::SysAllocString( strImage );
....
hr = pImgElement->put_align(bstrAlignment);
hr = pImgElement->put_alt(bstrAltText);
hr = pImgElement->put_src(bstrImage);
The code is within a DLL, and works fine when called from my test harness
However when calling the code from our product, it seems to cause an exception.
I've traced it to the put_src() method (in the fact that if I comment out the line, I no longer get the exception).
The line works fine, I exit the method, return to our product code… and then the first dll/MSHTML function I call I make (i.e. add another cell or save the page out), causes control, to jump to the nearest catch statement....
The HRESULT return seems correct (0)
I think the main problem is that I probably don't understand the IHTMLImgElement well enough…(the documentation is not so detailed…plus I cannot seem to find any code samples (besides Walk All) showing the use of the IHTMLImgElement object)
Roy
|
|
|
|
|
I'm working on a large web project (as a COM/C++ developer... not a webbie). This project uses COM objects to retrieve large amounts of data. The application uses DHTML to create tables with various properties (treated like a grid control) to display the data retreived by the COM objects. In order to retain the retrieved data from the COM objects the data is stored in multi-dimensional arrays in a hidden frame of the web project. That saves the user from having to re-retrieve the data from the COM components (which takes a couple minutes). However, each time the user goes back to the page is there a way I can cache that table so it does not have to be re-generated. It's so large it takes a long time to generate.
Thanks,
Matt
|
|
|
|
|
There are various commercial cacheing products available, here's a link to one I know of (no affiliation with them) http://www.xcache.com/
Another option that springs to mind is implementing some type of your own cacheing scheme. If the data doesn't change that regularly you could have your component write out the html for the hidden frame on an as needed basis. You'd need some way to determine whether you should send the statically generated html or if you need to have the component dynamically generate it again. Make sense?
Also, the new asp.net stuff has much more sophisticated cacheing capabilities that may be worth investigating if you can move to the .net platform.
Good Luck!
Jon
|
|
|
|
|
Thanks alot Jon. I may choose to try that HTML option. I'll take a look at the URL.
Matt
|
|
|
|
|
Speaking to the implementing your own caching scheme idea, I thought I would mention aspTear. I ran across a couple of articles on 4guys that talked about it. It works nicely for some lightweight work I am doing, with pages that change only rarely.
Here is the URL for part one of the article:
http://www.4guysfromrolla.com/webtech/071800-1.shtml
Hope that helps!
Jason Jystad
Cito Technologies
www.citotech.net
>------------------------------------------------<
"Luckily," he went on, "you have come to exactly the right place with your interesting problem, for there is no such word as 'impossible' in my dictionary. In fact," he added, brandishing the abused book, "everything between 'herring' and 'marmalade' seems to be missing."
-- Dirk Gently (Douglas Adams)
>------------------------------------------------<
|
|
|
|
|
Depending on the size of your data and if you can make IE 5 or newer a requirement for your application, you might want to let the client cache the data as xml using the userData behavior.
|
|
|
|
|
Is it possible to open a popup window using ONLY VBScript? I _know_ it can be done with JavaScript, but can it be done with VBScript alone? NOTE: I don't mean a MsgBox, I mean a proper browser window.
|
|
|
|
|
|
Er... because that uses JavaScript, when I specifically said only VBScript?
|
|
|
|
|
I'm currently working for a client that requested all server and client side code for their intranet site be done with vbscript.
While that isn't really important to you, I can say that most examples you see of client side code are done in javascript but the syntax is usually almost identical in vbscript barring the language differences like variable declarations, curly braces and line terminators, if you play around a bit I'm sure you can get a pure vbscript window.open to work just fine.
In fact, I'll make it really easy for you, took the javascript code from the dhtml reference in the message above, took off the line ending ";" and removed the parentheses because you get an error about calling a subroutine with parentheses. It's usually about that easy to translate javascript to vbscript because the object model is the same for dhtml you just have to eliminate the language differences.
Sub button1_onclick
window.open "layout.htm",null,"height=200,width=400,status=yes,toolbar=no,menubar=no,location=no"
End Sub
Good Luck!
Jon
|
|
|
|
|
Wow, I owe you an apology. I originally thought you had misunderstood my intentions... especially when that article had the example in JS {:v)
And knock me down with a feather, it works... I'm impressed. I'm just baffled as to why it is so hard to find information on it when I look {:v(
So thankyou.
|
|
|
|
|
Actually, I owe Andy an apology, since he was the original replyee and not yourself {:v)
Oh, it's been a funny day.
|
|
|
|
|
I agree with you, it's very hard to find any decent info in regards to using vbscript on the client side. It most definetly relates to cross-browser issues. When dealing with intranet's there is a legitimate argument to be made for using vbscript on both the client and server and not mixing languages when you're sure that everyone is using IE.
Hopefully you can see that the translation is pretty easy. I haven't found any javascript yet that couldn't be reworked into vbscript with a little bit of effort.
Good luck,
Jon
|
|
|
|
|
Thankyou, that's a very interesting discovery. I have to admit I don't intend to use VBScript client side because of the Netscape issue, but in this instance I wanted to use it to demonstrate a variety of Web programming 'languages', including both scripts, ActiveX, Java, DHTML (JS), etc.
|
|
|
|
|
Have fun!
    Sub Yar
        window.open "crap.htm"
    End Sub
Andy Gaskell, MCSD
|
|
|
|
|
Thanks to Jon, I have now realised that this also works in VBS... that article being in JS threw me for a loop.
There's an apology (to you) somewhere above this line, even though I mistakenly aimed it at Jon {:v)
|
|
|
|
|
We're developing our first internet application and there's something I'd like to know. The problem is that when debugging asp in the server, only one person can be debugging at a time. What I'd like to know is if there's any way to know (using Visual C++) if somebody is debugging at the moment, because we're having problems when two persons try to debug at the same time.
Thanks for the answer,
|
|
|
|
|
It's the first time we're developing an internet application and I've got a question about debugging. Since only one person can be debugging the application at the server, I'd like to know if there's any way to ask through Visual C++ the server if he's debugging at the moment.
Thanks for the answer,
|
|
|
|
|
Is there any way to register a control for use with ASP on a remote system?
A client of mine has a hosted web site that I would like to use ASPTear on, but the ISP does not provide this control. I might be able to convince them to register it for me, but I would rather not fight that battle.
This site is in a shared hosting environment on Win2k.
I know how to register controls on my own servers with regsvr32.exe, but obviously I do not have terminal or console access to this server.
Any ideas on a tricky way to get this done? With ASP maybe? Or some other way?
TIA,
Jason Jystad
Cito Technologies
www.citotech.net
>---------------------------------------------------------------------------<
There are no physicists in the hottest parts of hell, because the existence of a "hottest part" implies a temperature difference, and any marginally competent physicist would immediately use this to run a heat engine and make some other part of hell comfortably cool. This is obviously impossible.
-- Richard Davisson
>---------------------------------------------------------------------------<
|
|
|
|
|
Unless your ISP has left open many security holes, you will not be able to register the control on their box without them doing it for you.
The reason that ISPs will not allow users on a shared box to install their own controls, is that the control can potentially create security holes, read and write information that belongs to the others who share the server, and crash the server.
So, ISPs generally want to make sure that the control is a well-known product that will not cause any problems.
This is where .NET changes the rules. Since .NET controls cannot crash the server (in theory) and the ISP can limit their access. These controls can simply be copied to the server (no registration required) and they will work.
In conclusion... No can do for ASP... viva la .NET!!!
Troy
|
|
|
|
|
Yeah, that is what I figured. I admit, I was kinda hoping some smart-alec would post some less than entirely wholesome ways to try.
I mean, if they leave me a security whole why not use it.
Ah, well.
I can probably figure out a truly screwy way to pull it off without the control.
Thanks!
Jason Jystad
Cito Technologies
www.citotech.net
>------------------------------------------------<
"Luckily," he went on, "you have come to exactly the right place with your interesting problem, for there is no such word as 'impossible' in my dictionary. In fact," he added, brandishing the abused book, "everything between 'herring' and 'marmalade' seems to be missing."
-- Dirk Gently (Douglas Adams)
>------------------------------------------------<
|
|
|
|