CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> General/Other

 building webstats application

Print topic Send  topic

Author Message
rvp032582

Posts: 47
Posted: 09/05/2008, 7:58 AM

please submit your comments/opinions/anything relating to the feasibility of this *idea*:

is it possible to build a web analytics/site visits stats application (maybe similar to awstats) with codecharge? it would gather how many site visits, hits, and anything else that would help a SEO firm provide data for their clients.

in your opinion, how possible, complex, extensive, costly, time consuming would a project like this be?
thanks for your thoughts on the matter in advance
View profile  Send private message
datadoit
Posted: 09/05/2008, 4:04 PM

Are you thinking of using an existing application such as webalizer to
gather the stats?
wkempees


Posts: 1679
Posted: 09/05/2008, 4:23 PM

@DD
I interpret rvp's post as:
rebuilding webalizer, awstats using CCS.
It would, in my opinion:
80 to 100% possible, graphical representation aside using CCS
quite complex analyzing apache and possibly other text based log files,
?? extensive,
could be costly depending on the amount of external resources competence needed to even understand the data, as well as his own cost/per unit of time
less time consuming using CCS then doing it 'by hand'

Walter


_________________
Origin: NL, T:GMT+1 (Forumtime +9)
CCS3/4.01.006 PhP, MySQL .Net/InMotion(Vista/XP, XAMPP)

if you liked this info PAYPAL me: http://donate.consultair.eu
View profile  Send private message
datadoit
Posted: 09/05/2008, 6:22 PM

I would try to avoid reinventing the wheel in this situation. Don't
know anything about awstats, but the log file created by Webalizer can
easily be ported into a MySQL database via this perl script:

http://pol.spurious.biz/projects/scripting/httptraffic.pod.html

Run that in a cron periodically to keep things in sync. Then, your CCS
application is really just a reporting tool.
wkempees


Posts: 1679
Posted: 09/06/2008, 2:36 AM

@DD,
Agree with the reinventing part, might have an extra purpose though that we are not aware of.
Stand by my post.

Walter



_________________
Origin: NL, T:GMT+1 (Forumtime +9)
CCS3/4.01.006 PhP, MySQL .Net/InMotion(Vista/XP, XAMPP)

if you liked this info PAYPAL me: http://donate.consultair.eu
View profile  Send private message
datadoit
Posted: 09/06/2008, 6:03 AM

Here's how we reinvented the wheel:

<code>
//Make a web stat log entry of the page visit. Call this in the Page's
AfterInitialize event.
//MWR, 9/13/07.
function Logit()
{
//Log the page visit.
global $DBPortalDB;

//Get some info for the log entry.
$ip = $_SERVER['REMOTE_ADDR'];
$host = $_SERVER['HTTP_HOST'];
$page = $_SERVER['PHP_SELF'];
$referer = $_SERVER['HTTP_REFERER'];
$banner_referer = CCGetParam("referer","");

//See if there's a similar log entry within the last 10 minutes.
$db = new clsDBPortalDB();
$SQL = "SELECT log_id FROM log_web_stats "
. "WHERE log_ip='" . $ip . "' AND log_page='" . $page
. "' AND log_timestamp > (SUBDATE(NOW(),INTERVAL '10' MINUTE))";
$db->query($SQL);
$Result = $db->next_record();
$db->close();

//Only log a new entry if there's not a similar entry in the last 10
minutes.
if (!$Result) {
$db = new clsDBPortalDB();
$SQL = "INSERT INTO log_web_stats SET "
. "log_timestamp=NOW()" . ", "
. "log_ip='" . $ip . "', "
. "log_host='" . $host . "', "
. "log_page='" . $page . "', "
. "log_referer='" . $referer . "', "
. "log_banner_referer='" . $banner_referer . "'";
$db->query($SQL);
$db->close();
}
}
//End Logit()
</code>


Now this has worked fine and dandy, but what we found is as we added
more logging functions to each page load (changelog, permissions checks,
etc.), it ran slower and slower.

If running on Apache with Webalizer, that update to the log file takes
place on the page request level before any scripts are loaded, thus
keeping things nice and speedy.
rvp032582

Posts: 47
Posted: 09/06/2008, 12:33 PM

i was just asking about this, b/c i thought someone at where i worked promised a client we would provide something like this WITHOUT bothering to research the costs/time/feasibility of taking on a project like this FIRST. (which has happened quite a few times in the past and always end in disaster)
i learned later in the day that what they actually told the client was something less complex and easier to build. however, no details of the promised functionality was initially given...which is usually the case....therefore, prompting me to post this question.
thanks for your thoughts
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Web Database

Join thousands of Web developers who build Web applications with minimal coding.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.