CGI. REMOTE_ADDR and cgi.remote_host and hit counter

Hello
I am a beginner. Borrowed and updated the script for a counter and a few statistics. Everything works well except that the IP address of the visitor always presents itself as 216.251.42.XX. I tried having friends access to the entire site just to check if I get a different IP address but its 216.251.42.XX again

I wonder if anyone can advise me on where I'm wrong.
Thank you in advance.
THE CF SYNTAX BEING USED BY me is AS FOLLOWS:
< name cfquery = "updateHits" datasource = "#RequestDSN #" >
UPDATE hit_counter SET hit_count = hit_count + 1
< / cfquery >
< isdefined ("Cookie.user_id") CFIF >
< CFSET user_id = trim (Cookie.user_id) >
< CFELSE >
< CFSET user_id = "" >
< / CFIF >
< cfset currentdate = #DateFormat (Now (), 'dd mmm yy') # >
< cfset currenttime = #TimeFormat (Now (), 'HH') # >
< CFSET cgi.remote_addr = address >
< CFSET cgi.remote_host = host >
< CFSET referer = cgi.http_referer >
< CFSET cgi.http_user_agent = agent >
< CFSET = cgi.script_name page >
< CFIF NOT Len (host) >
< CFSET = 'unknown' host >
< / CFIF >
< CFIF NOT LEN (referer) >
< CFSET referer = "unknown" >
< / CFIF >
< name cfquery = "userstats" datasource = "#RequestDSN #" >
INSERT INTO stats (VISITDATE, VISITTIME, ADDRESS, HOST, REFERER, AGENT, PAGE)
VALUES ("#currentdate #", "#currenttime #", "#address #", "#host #", "#referer #", "#agent #", "#page #")
< / cfquery >

Solved my problem: use the cfif below instead of just address cfset cg.remote_addr =



Tags: ColdFusion

Similar Questions

  • Website hit count and rating stars

    Please help I have 3 questions:

    1.       How to add the hit count on a website so that I can find out how many people have visited my site.

    2.       How to add the rating stars for the music and video, so that people may be able to rate / vote for the best song/video of the month.

    Thank you for your help.

    StatCounter.com

    How do you know that GA or any other service of statcounter is accurate? It's quite accurate. GA uses the same technology to save its stats like any other statcounter. Not looking for any meaningful stats, just page views by visitors. GA provides no useful statistics anyway and they can not be displayed to visitors, so forget the GA to your needs.

    People care about stats success. When I replied to your thread I saw how many views there and who determined my decision to respond. If there are multiple views and several answers, I guess that the wire is too close, and I would not answer. View stats make a difference and viewers care of the it. When I seqrch a video from YouTube, I usually choose to display the result with the most views. Nobody cares about stats success huh? It's a complete load of Bull. Nobody cares about people who say nobody cares about stats success when you're in a thread asking how to hit his stats on a website is a more accurate statement.

  • I was in my email address and hitting a web address that I thought was going to take me to an article. Instead he took out my email all together, and I can no longer

    I was in my email address and hitting a web address that I thought was going to take me to an article that I wanted to read. Instead he took out my email all together, and now I can't open my e-mail address.

    What? Thunderbird does not open? or do you mean something else?

  • When I transfer mail, if I click a recipient and hit return, the name of the recipient is replaced by another name in the address book.

    When I transfer the mail on ICC, if I click a recipient and hit back, the recipient's name is replaced by a different name in the address book.

    It's bug and the bug fixers are working on it as soon as possible.

    The error only occurs if you use the key "TAB" or "Enter".
    So if you physically use the mouse to select recipients, and then click on in the other field, etc. - do not use TAB or Enter, then the fault does not occur.
    As an alternative, I highly recommend that you use the following method in the selection of contacts in new e-mail messages or in the transmission of emails.

    In a new message of Scripture
    Use the "Contacts sidebar". See the image below.
    If you do not see, then activate.
    'View' > "Contacts Sidebar" or toggle the view using the f9 key
    Select the address book
    Select the contacts
    Click on the button 'TO Addto' or one of the other options.

  • How to disable the AppStore offers updated app that does not exist on the ipod touch 5g ios 9 and Reset counter app

    Regularly I receive notifications of updated Brainiacs Sudoku which I had deleted Ipod Touch 5 g a long time ago.  I can't disable the app update counter until I have download the update.  So, how to disable the AppStore offers updated app that does not exist on the ipod touch 5g ios 9 and Reset counter of the application once and for all?

    Try to hide this purchase

    Hide and show purchases iTunes or iBooks on your Mac or PC - Apple Support

  • Dell Inspiron 531 - summer pc try to restore factory settings and hit the F8 key after close to a dozen times. I never see the advanced options to choose the factory restore. HELP please...

    tried to restore factory settings and hit the F8 key after close to a dozen times.  I never see the advanced options to choose the factory restore.   HELP please...  I'm following indications out of Dell's web site as well.    UGH

    http://support.Dell.com/support/topics/global.aspx/support/DellCare/contact_us?c=us&l=en&s=Gen&redirect=1

    If you have problems with the process of recovery of Dell, contact Dell at the link above.

    It's Dell recovery, not Microsoft software/process of.

    See you soon.

    Mick Murphy - Microsoft partner

  • What is the difference between count (1) selection of the tab and select count (*) tab;

    What is the difference between count (1) selection of the tab and select count (*) tab;

    994122 wrote:

    Hello

    SQL > set timing on

    SQL > select count (*) of the emp

    2 where deptno = 30;

    COUNT (*)

    ---------------

    6

    Elapsed time: 00:00:00.01

    SQL > select count (1) of the emp

    2 * where deptno = 30

    SQL > /.

    COUNT (1)

    -------------

    6

    Elapsed time: 00:00:00.01

    See that both give the same time

    Do you really think the 100th's of a second it takes 6 rows from counting will truly representative of the difference it takes actually?

    Such a small data set cannot possibly show no difference to these larger units of time (in the calculation of terms where we have millions of instructions per second in lieu)

    As the link to the FAQ provided in the response of Anton (first response on this thread) Watch, count (1) and count (*) are essentially the same, except that count (1) actually get re-written by the query re - write the step of the optimization to make it count (*).

    Generally 'count (*)' makes more sense language, because it reads like "count" while "count (1)" reads as "count we ', which does not have as much good sense when you actually count all.

  • Filter hit FxV question - looking for a way to create unique hit counter

    Hello

    is there a way to make a FxV unique hit counter for specific web pages?

    (1) I don't want to post multiple in the same session - as if the user click on the 'back' button and access into the page again.

    (2) Unfortunately, our web page design reuses the same name of the page - as splash.do, but has a runtime context variable.  I want to only capture charges for the first time that the splash.do is hit.  But if the user navigates to another page in the path of purchase which is also called splash.do - I don't want to count it, press.

    Thank you

    "mark".

    Mark,

    I don't know what is the best approach.  Here are two ideas to consider.

    Option 1 - create a successful filter which updates a session custom field only if the custom field is already filled.  The first time of the session, that the field is updated, the metric will update.  Then the filter hit will not be matched again for this session.

    It is an example.

    Option 2 - create a session filter.  In the filter of the session, match using a filter of success which is only splash.do.  If any session with URL/path of this updates the metric.  Session filters only updated at the end of a session, so it will match only once.  The filter of success for splash.do will have a lot of matches, but the session filter will update only once if there is a corresponding success.

    One of these give a try.

    Jeff

  • How to add a hit counter in Dw.

    How to add the hit counter in DW (simpel one)

    Success counters are meaningless.  They do not tell you or your site visitors anything accurate or useful. So don't waste time with them.

    Google Analytics is running in the background.  Among other things, GA followed by measures of code:

    • old, and unique hits
    • where these hits come from - by region of the world, research on organic web, other websites, etc...,
    • How long they stay - bounce rate,
    • how they interact with your site - what links they click, pages visited, etc...,
    • What browsers and web devices people use,
    • and much more.

    GA is free and it fits perfectly with your Google Webmaster Tools account (also free).

    Nancy O.

  • Synchronization of AO and output counter, arming and triggering the sequence of events

    Hi all

    I'm trying to synchronize a counter (used as a digital pulse) and analogue of a custom waveform output read from the file on a USB-6211. The goal is to always have these running until I hit 'STOP' and to be able to change the position of the pulse relative to each other. I created a VI by combining and modifying the Cont.Gen.Wfm.Int - Clk.Non - Regen.VI and the Continous.VI Gen dig Pulse Train and I'm now able to produce the two signals to the desired frequency, but I can't seem to get the "Initial period" to work correctly. The values that I come home do not seem to match what is happening LeRiz, and the spacing seems to vary from run to run (within each series is constant). In a previous post, Alfred has suggested:

    "Trigger counter outputs out of the trigger to start AO and adjusting the setting 'Initial period' should give you what you are looking for."  Don't forget to start the tasks of meter in the software before the tasks of the AO (if they are armed and ready to go before the start AO is sent). »

    (link here)

    I tried to use the controls and the propertynodes (perhaps incorrectly), but it doesn't seem to make a difference.

    I think what happens is that my arms and firing sequence is not done correctly. I read on as much information as I could about the outbreak and armament, but I don't know that I understand correctly. Most of the examples I found using an external trigger or perform analog input tasks finished. Does anyone have a suggestion on how to start my two tasks in the proper order? Is something else is wrong here?

    Thank you

    Gabe

    P.S. I have attached the VI and a sample waveform read.

    Hi Gabe,

    This is a cleaned of the VI version that should work (you need not adjust the initial deadline on the right fly?).  Instead of reading a file, I made just a simple square wave of 50% to be used for the test.

    Best regards

  • Conditional statement and a counter

    Hello-

    I'm doing a button than if you hit 4 times he plays a clip. The 5th hit - I want her to play a different clip. After the 5th success - it will reset and the process would start over. The script is in a keyframe and video clips are played with functions.

    playButton_btn.addEventListener (MouseEvent.CLICK, goButton1);

    function goButton1(evt:MouseEvent):void
    {
    runningMan_mc.gotoAndPlay (2);
    }

    As I mentioned earlier, the increase will be the first line of the function.  For what you wrote, I got the impression that you wanted to do different somethings, click on the 4th and 5th click, not 1 in 3 clicks.  The code that show you would be the first scenario to play four times until the 5th click.  If you don't want that you need to have another conditional to only play one on the 4th click.  You have also said to reset the counter, should be included as well...

    var number: number = 1;

    function goButton1(evt:MouseEvent):void
    {

    Count ++;

    If (count 4 >). {

    runningMan2_mc.gotoAndPlay (2);

    Count = 0;

         } else {

    runningMan_mc.gotoAndPlay (2);

    }
    }

    playButton_btn.addEventListener (MouseEvent.CLICK, goButton1);

  • After you enter a URL and hitting 'ENTER', nothing happens, except if I click on the arrow at the right end of the block URL.

    In the block of the URL, there is an arrow curved to the right end of the block. When I put the cursor in the block in preparation for the opening of a URL, the changes of curved arrow to a right arrow, pointing to the right. After entering the URL and pressing ENTER, nothing happens. If I click on the right arrow, I am taken to the desired site. It started to happen about 2 weeks ago. How can I solve this problem, so that when I hit the Enter key, I am taken to the desired site?

    This problem may be caused by the AVG Safe Search extension.

    Start Firefox in Firefox to solve the issues in Safe Mode to check if one of the extensions or if hardware acceleration is the cause of the problem (switch to the DEFAULT theme: Firefox/tools > Modules > appearance/themes).

    You can see on the AVG site if there is an update available.

  • MacBook Air has fallen down the stairs and hit a wall

    I got my backpack open with my macbook to the inside and I was dragging down the stairs, not noticing that the Backpack was opened and at halfway down the stairs (about 3 steps down, carpet stairs), my macbook slipped on the backpack and fell down the stairs hit a wall.

    I rushed to my macbook, there was only a dent on the side but nothing major, I turned it on and everything is quite normal, login screen is correct...

    Everything seems fine, I just want to know if I need to check for any serious damage, may be for Apple... etc.

    I had great fear, I had dropped my macbook on carpet floor about 2 or 3 times, he fell on the wooden floor, there was no serious damage, there are a few bumps on the side, but nothing super serious.

    And once again; Everything seems fine, I just want to know if I need to check for any serious damage, may be for Apple... etc.

    If it was my computer, I certainly will consider to Apple.  Let them watch over and advise you how to proceed.

    I hope you have a good backup!

  • Average per minute and Reset counter

    Hello

    First of all this is the first time I programmed in labview. I have a device that allows to measure radioactivity (in the disintegrations per minute) and this device makes a sound every time it receives a signal from radioactivity, in labview, I did an application that uses the microphone of my laptop to detect this (high volume sounds) and counting the sounds, but my problem is that I need the counter to record values after each minute and only give me an average of these values) first minute 5 signals so in the Midland to be number 5 for example, the next minute I get 7 signals so the medium box will show me 6). Can someone help me please?

    Hi Laurro,

    -Use ElapsedTime to determine your minutes intervals.

    -average: = (average_previous + new_value) /(i+1) with "i" being the loop iterator. You need a registry change to store the value for average_previous

    Both are fundamental concepts of LabVIEW and you can learn with all these free beginner resources offered by OR on their website (Start here)!

  • Until I found this thread, I lost 16 months in the Inbox during compacting emails, I went to the trash can and hit restore all, but I can't find them

    As I close outlook wxpress yesterday, I got the prompt for compaction. It's been awhile, so I let it start and stop later the computer without checking anything. Today, when I went to check my messages, everthting from 2012 until yesterday was gone. I went in the trash and saw that he was responsible. I have selected to restore a prompt came and I hit restore all. I return wwent into my Inbox and found nothing changed. I searched the web and found this thread and read something about 'with OE not open' and stuff on .bak and .dbx, and fear that I might have screwed up. Where can I find these messages?

    You need more than a single click to restore. Here's my answer "keeps" together with the instructions. The party concerned is in blue, but please read all this.
     
     

    Two reasons the most common for what you describe is disruption of the compacting process, (never touch anything until it's finished), or bloated folders. More about that below.
     

    Why OE insists on compacting folders when I close it? :
    http://www.insideoe.com/FAQs/why.htm#compact
     
     
     
     
    Recovery methods:
     
    If you are running XP/SP3, then you should have a backup of your dbx files in the Recycle Bin (or possibly the message store), copied as bak files.
     
    To restore a folder bak on the message store folder, first find the location of the message store.
     
    Tools | Options | Maintenance | Store folder will reveal the location of your Outlook Express files. Note the location and navigate on it in Explorer Windows or, copy and paste in start | Run.
     
     
    In Windows XP, the .dbx files are by default marked as hidden. To view these files in the Solution Explorer, you must enable Show hidden files and folders under start | Control Panel | Folder options | View.
     

    Note: If you have new messages in the folder you are go restore, move them to a folder first created user, or they will be lost. They can be moved once the old posts have been restored.
     

    Close OE and in Windows Explorer, click on the dbx to the file missing or empty file, then drag it to the desktop. It can be deleted later once you have successfully restored the bak file. Minimize the message store.
     
     
    Open OE and, if the folder is missing, create a folder with the * exact * same name as the bak file you want to restore but without the .bak. For example: If the file is Saved.bak, the new folder should be named saved. Open the new folder, and then close OE. If the folder is there, but just empty, continue to the next step.
     
     
    First of all, check if there is a bak file already in the message. If there is, and you have removed the dbx file, go ahead and rename it in dbx.
     

    If it is not already in the message, open the trash and do a right-click on the file bak for the folder in question and click on restore. Open the message store up and replace the .bak by .dbx file extension. Close the message store and open OE. Messages must be in the folder.
     
     
    If messages are restored successfully, you can go ahead and delete the old dbx file that you moved to the desktop.

     
     
    If you have not then bak copies of your dbx files in the Recycle Bin:
     

    DBXpress run in extract disc Mode is the best chance to recover messages:
    http://www.oehelp.com/DBXpress/default.aspx
     
     
     
     
     
     

    A general warning to help avoid this in the future:
     

    Do not archive mail in default OE folders. They finally are damaged. Create your own folders defined by the user for mail storage and move your mail to them. Empty the deleted items folder regularly. Keep user created folders under 300 MB, and also empty as is possible to default folders.
     

    Disable analysis in your e-mail anti-virus program. It is a redundant layer of protection that devours the CPUs, slows down sending and receiving and causes a multitude of problems such as time-outs, account setting changes and has even been responsible for the loss of messages. Your up-to-date A / V program will continue to protect you sufficiently.
     
     
     
    For more information, see:
    http://www.oehelp.com/OETips.aspx#3 
     
     
     
    And backup often.
     
     
    Outlook Express Quick Backup (OEQB Freeware)
    http://www.oehelp.com/OEBackup/default.aspx  
     
     
     

     
     

Maybe you are looking for

  • text of encrypted e-mail

    Emails received were OK, but Thunderbird is restarted, the text on some has blur and seems to relate to other messages. This is the second time that this has happened. Help please. Cannot attach example text is too long, which is longer than 10,000 c

  • Disable thumbnails of images

    Is there a way to disable the thumbnails that appear in the Skype chat? I need to be able to see when an image is sent then is it possible to return it when he appeared as a file transfer. I can't seem to find an option to disable the thumbnails, I t

  • Download Recovery Manager windows 7 64 bit

    Hello! I formatted my laptop, I installed Windows 7 from a USB key again (here I copied an ISO image of windows 7) and I lost the HP Recovery Manager. The windows do not work properly and I am trying to restore to factory settings and make my laptop,

  • Can I recover lost files?

    I lost a bunch of photo files when I cut and pasted from my laptop on a DVD-R. I also lost the files that I had on the disk. Is it possible to recover these myself or do I need to bring it to a computer store? Thank you!

  • PRINTING WITH IPAD 2

    Hello, y at - it a free app or charge to be able to print using printer all-in-one HP Officejet J6480. TY