Announcement

Collapse
No announcement yet.

Click counter question

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Shawn Anderson
    replied
    Now, couldn't I do that click count server job with a PB CGI on an exe-friendly server, to service my own clicks?
    yes, that's exactly what you could do

    Leave a comment:


  • John Strasser
    replied
    Hi Hans,

    You could do exactly that. Or you could search for other software that will do that. <shrug> I was looking for the fastest way to accomplish what Chris wanted.

    JS

    Leave a comment:


  • Hans-Dieter Veit
    replied
    Originally posted by John Strasser View Post
    The easiest way to do that is use php redirection and then parse the server logs.

    PHP Code:
    <?php
    $url
    "http://www.inthespiritmarketing.com/index.php";
    header"Location: $url);
    ?>
    Basically, you would create a "somefile.php" and use the above code. Change the url in the code to the name of the file that you want them to download. Then your web server will track how many times that somefile.php JS
    And why not put some code in the PHP-chunk to read the counter value from some data base or even an plain text file stored on the server, increment it and write it back. I'm sure there are some quite sophisticated solutions premade and ready to use in the numeros PHP-Library-Sites out there.

    Hans

    Leave a comment:


  • John Strasser
    replied
    You're welcome.

    Now that I think about though, your server logs *should* show you how often a file has been requested. In which case you can skip the entire step I described above.

    But it's still a cool trick to get people where you want them when they go where they shouldn't go.

    JS

    Leave a comment:


  • Chris Holbrook
    replied
    Thanks John!

    Leave a comment:


  • John Strasser
    replied
    PS - robots.txt doesn't actually DO anything if the robot wants to ignore it.

    In fact, many malware robots will use it as a sitemap of where to go. But since a robot has to make a request from the web server, they'll get servered the index.php file when they go into those directories where they shouldn't be.

    Well behaved robots (most search engines) will follow the robots.txt instructions.

    JS

    Leave a comment:


  • John Strasser
    replied
    The easiest way to do that is use php redirection and then parse the server logs.

    PHP Code:
    <?php
    $url
    "http://www.inthespiritmarketing.com/index.php";
    header"Location: $url);
    ?>
    Basically, you would create a "somefile.php" and use the above code. Change the url in the code to the name of the file that you want them to download. Then your web server will track how many times that somefile.php has been requested. For someone at your level, it will take you less time to write a PB program to ftp over the (ascii text) log files and parse them directly for the reports you want than to write a php program

    Fwiw - if you know C (or any other C based language) you could be up and running in php in about a week. I like the tutorial over at www.tizag.com

    I use the above trick to quasi-secure all the directories on my servers. This way if someone tries to be cute and go to directories that I don't want them to go to, the get redirected to where I want them (like my newsletter sign up page ). Just put that code in an "index.php" file in the directory in question.

    Unbreakable? 'course not. But it's friendlier than a "FORBIDDEN" message and I don't have to change any server settings (which I then tend to forget about when I'm debugging something).

    Hope this helps

    JS

    Leave a comment:


  • Chris Holbrook
    started a topic Click counter question

    Click counter question

    I have some pages on a website hosted on UNIX, so no chance of writing a PB CGI. I want to add a click counter - not a page counter - to record the number of downloads of different items on the same page. I see that there are a few proprietary "click counters" out there, and they appear to work by passing an identifier to a remote URL where the counter is incremented, and somehow an image of the count is generated and returned.

    Now, couldn't I do that click count server job with a PB CGI on an exe-friendly server, to service my own clicks?

    Or would it make more sense to learn PHP and do it on the UNIX server? ISTR there could be a security issue with this, but details evade me, it's been a year since I tangled with the web...
Working...
X
😀
🥰
🤢
😎
😡
👍
👎