|
|
| netbest 2006-02-25, 6:15 pm |
| I'm trying to determin if it is possible to increment a server side text file
based counter based on an event. For instance. When a visitor clicks on a
spacific link, I'd like to open a specified file, read then increment a numeric
counter but it is not necessary to display any info to the visitor. The site
owner could then, when they want, view the text file to determine the number of
events found. I was thinking something like an "onclick" call but any kind of
process supported through UNIX servers would be useful for this need.
Has anyone seen this type of thing work...
Thank you for your consideration.
| |
| Wally Kolcz 2006-02-25, 6:15 pm |
| I have seen this script for Windows (ASP). You would sent up the links in
the db and when the user clicked on a link, it would go to the db, redirect
them based on the entered URL link and increment the by one.
The owner could then login and view the numbers of hits on each link.
Is that what you are looking for in concept?
| |
| bregent 2006-02-25, 6:15 pm |
| Sure, but you need to use a server side script. What server model are you using?
| |
| netbest 2006-02-25, 6:15 pm |
| That's probably the concept... Our serve us UNIX based and doesn't support ASP
so maybe there's hope. I'd hoped that it could be set to use a very small text
type file that would just contain a number that would be incremented.
| |
| netbest 2006-02-25, 6:15 pm |
| Thanks Joe.
Yes.. we have logs.. no problem there.. unfortunately.. I'm not looking for a
log event that is tracked. We are looking at a link that goes off of the site
and, while exit pages are logged.. we are only allowed to see the "top 10".
We would like to be able to count and track how many times the link exiting the
site to this specific location is clicked.
Since these servers don't support ASP, my hope is that some CGI might be
available to provide the function or.. that there is some other HTML capability
that could be used to do it.
| |
| Joe Makowiec 2006-02-25, 6:15 pm |
| On 25 Feb 2006 in macromedia.dreamweaver, netbest wrote:
> I'm trying to determin if it is possible to increment a server side
> text file based counter based on an event. For instance. When a
> visitor clicks on a spacific link, I'd like to open a specified
> file, read then increment a numeric counter but it is not necessary
> to display any info to the visitor. The site owner could then, when
> they want, view the text file to determine the number of events
> found. I was thinking something like an "onclick" call but any kind
> of process supported through UNIX servers would be useful for this
> need.
Ask your hosting provider for your site logs. That will show you what
pages internal to your site were visited. If you want a report of
external links which were visited from your site, you could do it
something like:
<a href="forward.php?site=http://example.com/">Visit example.com</a>
The visits to external sites would then be tracked in your logs.
forward.php would look like:
<?php
$gotoSite = $_REQUEST['site'];
header('Location: ' . $gotoSite);
exit;
?>
You should also be able to do comparable for ASP, ASP.Net or Cold
Fusion pages.
--
Joe Makowiec
http://makowiec.net/
Email: http://makowiec.net/email.php
| |
| bregent 2006-02-25, 6:15 pm |
| >Since these servers don't support ASP, my hope is that some
>CGI might be available to provide the function or.. that there is
Sure, any supported server side language like PERL or PHP could be used.
>some other HTML capability that could be used to do it.
No. You can't update a file on the server from html code. That what server
side languages do.
| |
| netbest 2006-02-25, 10:14 pm |
| Thanks for your time.
I know it's a bunch to ask but, can you suggest any particular script that
might be useful for the purpose. I've appearently got some kind of search mind
block and am finding counters but I really haven't found an "event" type
counter.
Thanks again.
| |
| Joe Makowiec 2006-02-25, 10:14 pm |
| On 25 Feb 2006 in macromedia.dreamweaver, netbest wrote:
> Yes.. we have logs.. no problem there.. unfortunately.. I'm not
> looking for a log event that is tracked. We are looking at a link
> that goes off of the site and, while exit pages are logged.. we are
> only allowed to see the "top 10".
Then you don't have logs. Look for a new host.
> We would like to be able to count and track how many times the link
> exiting the site to this specific location is clicked.
>
> Since these servers don't support ASP, my hope is that some CGI
> might be available to provide the function or.. that there is some
> other HTML capability that could be used to do it.
What do they support? CGI can be problematic for writing files
serverside, particularly if the server is as locked down as you seem to
imply it is.
--
Joe Makowiec
http://makowiec.net/
Email: http://makowiec.net/email.php
|
|
|
|
| Copyright 2003 - 2008 forum4designers.com Software forum Computer Hardware reviews |