Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: A simple html website visitor log  (Read 17188 times)

0 Members and 1 Guest are viewing this topic.

phokur

  • Guest
A simple html website visitor log
« on: April 29, 2006, 12:32:12 PM »
Hello there, can anybody point me in the right direction for a html approach to logging a person's ip when they visit your website? I have had so many people ask me for a myspace solution to seeing who is viewing their profile. I remember seeing a javascript way of doing it awhile back, but myspace does not allow anything other than html. The only way I know it's possible is this guy wrote one in php that works in myspace: http://www.danasoft.com/  I don't know php, but can anybody explain to me how he did it? He won't answer my emails. I've searched and can't turn anything up. I know some javascript, a good bit of html, and java if it matters. Thanks anybody willing to help, Scott

Blackberry



    Adviser
  • For those with wings, fly to your dreams.
    Re: A simple html website visitor log
    « Reply #1 on: April 29, 2006, 01:09:27 PM »
    You can't do this by html, pehraps you can write it in PHP and import it with html, but there is now way you can do this in html
    Everybody knows you can't click here. But I know you will try it :)

    phokur

    • Guest
    Re: A simple html website visitor log
    « Reply #2 on: April 29, 2006, 01:12:30 PM »
    Yea that's how I assume danasoft.com did it. If I try to view the source of it I just get jibberish. I'd be happy with the php and importing it, but can anybody help me out or point me to a site that can?

    Rob Pomeroy



      Prodigy

    • Systems Architect
    • Thanked: 124
      • Me
    • Experience: Expert
    • OS: Other
    Re: A simple html website visitor log
    « Reply #3 on: April 29, 2006, 02:54:09 PM »
    "Simple" (he says).  You can use PHP to output a graphic image.  That image can be a blank (transparent) single pixel.  The PHP script that outputs the image can also do anything else that a PHP script can do, including logging the requesting IP address.  You'd need to host the PHP on a PHP-enabled web server.  Possibly you could use the PHP to track the IP visits in a MySQL database.
    Only able to visit the forums sporadically, sorry.

    Geek & Dummy - honest news, reviews and howtos

    phokur

    • Guest
    Re: A simple html website visitor log
    « Reply #4 on: April 29, 2006, 05:41:07 PM »
    Can you link me to a site or something with an example of what you mean? Thanks for the reply though!

    Rob Pomeroy



      Prodigy

    • Systems Architect
    • Thanked: 124
      • Me
    • Experience: Expert
    • OS: Other
    Re: A simple html website visitor log
    « Reply #5 on: April 30, 2006, 01:46:53 AM »
    I haven't seen any specific examples; I just know what can be done.  Go over to the PHP official documentation.  Check out the image function section.
    Only able to visit the forums sporadically, sorry.

    Geek & Dummy - honest news, reviews and howtos

    death-of-dos

    • Guest
    Re: A simple html website visitor log
    « Reply #6 on: May 01, 2006, 08:54:13 AM »
    you can always install a statcounter ( http://www.statcounter.com ) in your pages to log your visitors. it does show you their ip addresses.

    phokur

    • Guest
    Re: A simple html website visitor log
    « Reply #7 on: May 01, 2006, 01:12:55 PM »
    That sounds like it would work, I went ahead and set up an account for a invisible counter that was pure html. It gave me this snippet:
    <!-- Start of StatCounter Code -->
    <a href="http://www.statcounter.com/" target="_blank">counter hit xanga" border="0[/url]
    <!-- End of StatCounter Code -->

    I insert it and myspace immediately turns it into my code into:

    <a href="http://www.../" target="_blank">..[/url]

    Any ideas why or how to fix this?

    Rob Pomeroy



      Prodigy

    • Systems Architect
    • Thanked: 124
      • Me
    • Experience: Expert
    • OS: Other
    Re: A simple html website visitor log
    « Reply #8 on: May 01, 2006, 11:53:18 PM »
    MySpace obviously strips bits out that it doesn't like.  All you need is this bit though:
    Code: [Select]
    <img src="http://c15.statcounter.com/counter.php?sc_project=1525483&java=0&securit y=a2bf4068&invisible=1" alt="counter hit xanga" border="0">
    Only able to visit the forums sporadically, sorry.

    Geek & Dummy - honest news, reviews and howtos

    phokur

    • Guest
    Re: A simple html website visitor log
    « Reply #9 on: May 02, 2006, 06:41:11 PM »
    It turns that code into

    ..

    Two dots... it must really hate javascript. is there any way to have it on a different website than somehow have it still count my myspace? Like importing it? Or shortcutting it...

    Rob Pomeroy



      Prodigy

    • Systems Architect
    • Thanked: 124
      • Me
    • Experience: Expert
    • OS: Other
    Re: A simple html website visitor log
    « Reply #10 on: May 03, 2006, 03:01:28 AM »
    Try this instead:
    Code: [Select]
    <img src="http://c15.statcounter.com/counter.php?sc_project=1525483&security=a2bf4068&invisible=1">Does that work?
    Only able to visit the forums sporadically, sorry.

    Geek & Dummy - honest news, reviews and howtos

    phokur

    • Guest
    Re: A simple html website visitor log
    « Reply #11 on: May 03, 2006, 08:28:32 AM »
    Nope man, it alters the code as soon as I submit it  :-?

    Here are a couple screenshots...

    Before when inserting the code:


    After I submit it:

    Rob Pomeroy



      Prodigy

    • Systems Architect
    • Thanked: 124
      • Me
    • Experience: Expert
    • OS: Other
    Re: A simple html website visitor log
    « Reply #12 on: May 03, 2006, 08:39:36 AM »
    That bites.  There's no reason for that to be edited out.  Does it allow you to link to any external images?
    Only able to visit the forums sporadically, sorry.

    Geek & Dummy - honest news, reviews and howtos

    phokur

    • Guest
    Re: A simple html website visitor log
    « Reply #13 on: May 03, 2006, 02:35:34 PM »
    Yea, I can show external pictures, videos... heck I even put games on there from addictinggames.com
    This code works fine for it, I got it from google.video, they have a put in your website link that gives you the code.

    <embed allowScriptAccess="never"         style="width:650px; height:400px;" id="VideoPlayback" align="middle" type="application/x-shockwave-flash" src="http://farm.addictinggames.com/D78AQSAKQLQWI9/2159.swf" allowScriptAccess="never" quality="best" bgcolor="..ffffff" scale="noScale" wmode="window" salign="TL"  FlashVars="playerMode=embedded"> </embed>

    It's pretty much the same as a personal website except it doesn't allow anything other than html. Maybe this is why nobody does it... it can't be done  :-?

    phokur

    • Guest
    Re: A simple html website visitor log
    « Reply #14 on: May 03, 2006, 02:41:20 PM »
    That last post gave me an idea.

    <embed allowScriptAccess="never"            style="width:0px; height:0px;" id="VideoPlayback" align="middle" type="application/x-shockwave-flash" src="http://c15.../counter.php?sc_project=1525483&java=0&securit y=a2bf4068&invisible=1" allowScriptAccess="never" quality="best" bgcolor="..ffffff" scale="noScale" wmode="window" salign="TL"  FlashVars="playerMode=embedded"> </embed>

    I tried it, myspace doesn't edit it out. And it's invisible if I change the height and width. Not sure if it works though. I'll keep an eye on the statcounter site and see if I get any views. But it should work right?