Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 21
  1. #11

    Quote Originally Posted by kolz View Post
    Javascript ...hmm. Sayon ra unta ni buhaton if gamitan ug server side scripts like PHP or Perl, ASP or ASP.NET ba kaha. But client side script like Javascript, I don't think so, unless if you make your log files accessable to the client - exposing it directly and serving it directly from your web browser. This is a huge security risk, which I advise not to do.
    Google Analytics mn lage kay javascript gamit.

  2. #12
    yeah..give us more examples guys..knang simple and maybe use simple terms too..nosebleed pa kau mi sa uban terms gud..explain lng guys and be patient lng..thnx sa mga moadvice..thnx mga bro..

  3. #13
    Quote Originally Posted by xiao-xiao View Post
    Google Analytics mn lage kay javascript gamit.
    Google analytics uses client side scripting, which will only apply if all pages are infused with javascript to record site visits.

    What if one site, doesn't employ javascript at all, and uses pure html? Or your pages are viewed in a browser that doesn't support Javascript? Then google analytics doesn't work.

    To fully understand the differences between server side scripting (PHP) and client side scripting (javascript)
    read this:

    Linklove Server-side or client-side web analytics (part 1)

    There are advantages and disadtages on which ones the use (server side scripting vs. client side scripting), it depends on the requirements and the target environment, the best solution is to combine both:

    Linklove Server-side or client-side web analytics (part 2)

    Based on the initial requirements that TS has mentioned, I assume the server side scripting would be best for them.

    @TS ... please read the above two links I posted. It will help you understand and gather requirements from your user.

  4. #14
    Clarification lang on my last post ....

    I've just read Google Analytics API. It uses both server-side (PHP) and client-side scripting (Javascript). The mere fact that all pages that needs to be tracked needs to have the tracking code ga.js

    Code:
    <script type="text/javascript">
    var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
    document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
    </script>
    <script type="text/javascript">
    try {
    var pageTracker = _gat._getTracker("UA-9602365-1");
    pageTracker._trackPageview();
    } catch(err) {}</script>
    To get the stats, you would have to communicate with google's servers (<gaJsHost>google-analytics.com/ga.js ... if you examine the script above.

  5. #15
    I think dili mn kaayo issue karon kung naka-enable ba ang javascript. rare ra mn kaayo ang mga ga-disabled ug javascript.

    anyway, for me, I suggest server-side scripting.

  6. #16
    Quote Originally Posted by xiao-xiao View Post
    I think dili mn kaayo issue karon kung naka-enable ba ang javascript. rare ra mn kaayo ang mga ga-disabled ug javascript.

    anyway, for me, I suggest server-side scripting.
    Yup, there are only a few browsers now that does not support javascript. But not all clients of your webserver are browsers, you can never guess what's out there, for example if you serve binaries through http, such as the case of pdf files - they are not served through normal html, and hence google-analytics will not catch them (unless you do link forwarding). Or in the case for example of wget (command line tool to download files/pages through http). Or better yet - web services, they masquerade using http, through TLS or HTTPS. Google analytics will not be able to capture these kinds of traffic to your webserver. IMHO Google analytics is only good in tracking web pages.

    For the TS, I only got an apache log analyzer in PHP, I got this script sometime ago, I couldn't trace where I got it or its original owner, I just have it in my script library. Its easy enough to understand, all you have to do is change the line which parses apache logs:

    Code:
    preg_match("/^(\S+) (\S+) (\S+) \[([^:]+):(\d+:\d+:\d+) ([^\]]+)\] \"(\S+) (.*?) (\S+)\" (\S+) (\S+) (\".*?\") (\".*?\")$/", $line, $matches); // pattern to format the line
    to match IIS log format ... and the log file location (to where IIS log is located).

    Here's the rest of the code:
    Code:
    <?php
    class apache_log_parser
    {
    
      var $bad_rows; // Number of bad rows
      var $fp; // File pointer
    
      function format_log_line($line)
      {
        preg_match("/^(\S+) (\S+) (\S+) \[([^:]+):(\d+:\d+:\d+) ([^\]]+)\] \"(\S+) (.*?) (\S+)\" (\S+) (\S+) (\".*?\") (\".*?\")$/", $line, $matches); // pattern to format the line
        return $matches;
      }
    
      function format_line($line)
      {
        $logs = $this->format_log_line($line); // format the line
    
        if (isset($logs[0])) // check that it formated OK
        {
          $formated_log = array(); // make an array to store the lin info in
          $formated_log['ip'] = $logs[1];
          $formated_log['identity'] = $logs[2];
          $formated_log['user'] = $logs[2];
          $formated_log['date'] = $logs[4];
          $formated_log['time'] = $logs[5];
          $formated_log['timezone'] = $logs[6];
          $formated_log['method'] = $logs[7];
          $formated_log['path'] = $logs[8];
          $formated_log['protocal'] = $logs[9];
          $formated_log['status'] = $logs[10];
          $formated_log['bytes'] = $logs[11];
          $formated_log['referer'] = $logs[12];
          $formated_log['agent'] = $logs[13];
          return $formated_log; // return the array of info
        }
        else
        {
          $this->badRows++; // if the row is not in the right format add it to the bad rows
          return false;
        }
      }
    
      function open_log_file($file_name)
      {
        $this->fp = fopen($file_name, 'r'); // open the file
        if (!$this->fp)
        {
          return false; // return false on fail
        }
        return true; // return true on sucsess
      }
    
      function close_log_file()
      {
        return fclose($this->fp); // close the file
      }
    
      function get_line($line_length=300)
      {
        return fgets($this->fp, $line_length); // true and get a line and return the result
      }
    
    }
    $apache_log_parser = new apache_log_parser(); // Create an apache log parser
    
    if ($apache_log_parser->open_log_file('example.log')) // Make sure it opens the log file
    {
      while ($line = $apache_log_parser->get_line()) { // while it can get a line
        $parsed_line = $apache_log_parser->format_line($line); // format the line
        print_r($parsed_line); // print out the array
      }
      $apache_log_parser->close_log_file(); // close the log file
    }
    else
    {
      echo 'Sorry cannot open log file.';
    }
    
    ?>

  7. #17
    Just register to google analytics, it's free, made by google and reliable.

  8. #18
    have you heard about ibc japan we're currently working on this site.. then among tl kay m.propose unta og tracker for our website for statistical purposes.. we need more recommendations and elaborate explanations on how this systems gonna work.. sorry if noobz pajud ko ani.. not familiar with hardcore it vocabularies pajud.. ang gamit namu diri is asp man gud so no idea if how to embed ang katong code.. ive read some random articles na pd daw mag.use sa cookies yet d pa keu ko kasabot unsaon pag.implement.. thanks dai daan ninyo ^^

  9. #19
    tan-awa sa imo web host basi naay feature na mo track ug website stats like AWSTATS..

  10. #20
    Quote Originally Posted by marshydootzy View Post
    have you heard about ibc japan we're currently working on this site.. then among tl kay m.propose unta og tracker for our website for statistical purposes.. we need more recommendations and elaborate explanations on how this systems gonna work.. sorry if noobz pajud ko ani.. not familiar with hardcore it vocabularies pajud.. ang gamit namu diri is asp man gud so no idea if how to embed ang katong code.. ive read some random articles na pd daw mag.use sa cookies yet d pa keu ko kasabot unsaon pag.implement.. thanks dai daan ninyo ^^
    Unsa man gyud requirements? Do you have Web Admin access? Do you have complete control of your webserver?
    Pangutan-a kuno inyo TL like the following: Administration (like ka install ba ka ug modules like AWstats, unsay limits sa admin account, security access, etc.), Security (kinsa ang makatan-aw sa stats, etc), Range of features na i provide, and what kind of traffic you would like to capture (Like do you plan to capture HTML page traffic only, or others).

  11.    Advertisement

Page 2 of 3 FirstFirst 123 LastLast

Similar Threads

 
  1. NEED HELP GUYS LOOKING FOR A GOOD PC FOR GAMING
    By silvertoter in forum Computer Hardware
    Replies: 19
    Last Post: 07-30-2010, 10:10 PM
  2. i need help guys
    By eiZaN in forum Software & Games (Old)
    Replies: 4
    Last Post: 03-14-2008, 06:06 PM
  3. i need help guys
    By eiZaN in forum Music & Radio
    Replies: 5
    Last Post: 12-26-2007, 03:31 PM
  4. HELP GUYS NEED YOUR CONSULTAITION
    By N2600 in forum Computer Hardware
    Replies: 9
    Last Post: 10-30-2007, 09:23 AM
  5. excel programs; needs help guys!!!
    By rufo in forum Software & Games (Old)
    Replies: 3
    Last Post: 01-14-2006, 12:18 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
about us
We are the first Cebu Online Media.

iSTORYA.NET is Cebu's Biggest, Southern Philippines' Most Active, and the Philippines' Strongest Online Community!
follow us
#top