Results 1 to 19 of 19

Thread: Getting request IP

  1. #1

    Thread Starter
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    use the REMOTE_ADDR CGI variable.
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  2. #2
    Addicted Member Razzle's Avatar
    Join Date
    Jan 2000
    Location
    Berlin, Germany
    Posts
    161
    This doesn't return the request ip, it returns the IP of the tripod CGI Server
    Razzle
    ICQ#: 31429438
    What is the difference between a raven?
    -The legs. The length is equal, especially the right one.

  3. #3

    Thread Starter
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    ...does some checking with Apache...
    SERVER_ADDR returns the Tripod CGI server... REMOTE_ADDR is the client computer.
    Honestly.
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  4. #4

    Thread Starter
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    if you're there within the next couple of hours: try:

    http://212.41.34.41/cgi-bin/cgienv.cgi

    for an example.


    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  5. #5
    Addicted Member Razzle's Avatar
    Join Date
    Jan 2000
    Location
    Berlin, Germany
    Posts
    161
    Server was down, I'll try again later

    between check this
    http://thelast.unicorn.tripod.com/cgi-bin/test.cgi

    it returns the content of the ENV variables
    REMOTE_ADDR : 209.185.181.11
    REMOTE_HOST : 209.185.181.11

    ip SHOULD differ on when you try...
    Razzle
    ICQ#: 31429438
    What is the difference between a raven?
    -The legs. The length is equal, especially the right one.

  6. #6
    Addicted Member Razzle's Avatar
    Join Date
    Jan 2000
    Location
    Berlin, Germany
    Posts
    161
    oh yeah, the disadvantages of not having ISDN

    have you checked the link?
    Razzle
    ICQ#: 31429438
    What is the difference between a raven?
    -The legs. The length is equal, especially the right one.

  7. #7

    Thread Starter
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    yeah, I checked it...if you're there then go here:

    http://212.41.32.192/cgi-bin/cgienv.cgi
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  8. #8
    Frenzied Member HarryW's Avatar
    Join Date
    Jan 2000
    Location
    Heiho no michi
    Posts
    1,827
    Wouldn't your user need a static IP to do that though? Most people have dynamic IPs nowadays. If you don't want them to be able to reconnect then vote again, then you might have to try something else.

    I think you can store cookies server-side as well as client side. I'm not sure whether they work with dynamic IPs though.
    Harry.

    "From one thing, know ten thousand things."

  9. #9

    Thread Starter
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    Yep. Unfortunately, it's very hard to accurately track users, since many turn cookies off. Server-side cookies (I've never heard of them) would probably go by IP address as well, in which case you're stuffed. If only there were a way to uniquely identify the sending modem....
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  10. #10
    Lively Member
    Join Date
    Mar 2000
    Location
    Lowestoft
    Posts
    91
    y dont u use a member system? and have ur users register at ur site? then u can have a database doing the work, and only allowing them to vote once.. Just a thought
    Mag-Net's Home
    Visual Studio 6-Enterprise - SP4
    ICQ: 35519773
    Have Fun

  11. #11

    Thread Starter
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    But how do you track if they're logged in or not? Catch-22, guys. There's no way to stop them deleting the login cookie, and reregistering.
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  12. #12
    Lively Member
    Join Date
    Mar 2000
    Location
    Lowestoft
    Posts
    91

    Lightbulb Think!

    Ha ha think people, all that needs to be done is a username and password system on a database on the server, they register at the site, and nothing is stored on their computer, yeah i suppose they could keep registering at the site and voting that way,, but seriously now, who would be that pathetic to do that?
    Mag-Net's Home
    Visual Studio 6-Enterprise - SP4
    ICQ: 35519773
    Have Fun

  13. #13

    Thread Starter
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    v. good point. I suppose the number of people doing that would be small enough not to make too big a difference.
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  14. #14
    Addicted Member Razzle's Avatar
    Join Date
    Jan 2000
    Location
    Berlin, Germany
    Posts
    161
    then do you know where I could get a free database server?

    unfortunately I don't have a permanent internet connection so I can't use my pc as server...
    Razzle
    ICQ#: 31429438
    What is the difference between a raven?
    -The legs. The length is equal, especially the right one.

  15. #15

    Thread Starter
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    I'm assuming UK here...but http://www.uklinux.net are a free ISP, running a MySQL database server (same RDBMS as VB-World).
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  16. #16
    Lively Member
    Join Date
    Mar 2000
    Location
    Lowestoft
    Posts
    91
    cant u just stick it on ur web space? or will you be using asp? if so your server may not support that...but i am write in saying that you can hook up a simple database on any server right? but actually ur gonna have to write to the servers database...so, yeah that should work if you have a dll on there to do all the work?
    Mag-Net's Home
    Visual Studio 6-Enterprise - SP4
    ICQ: 35519773
    Have Fun

  17. #17
    Frenzied Member HarryW's Avatar
    Join Date
    Jan 2000
    Location
    Heiho no michi
    Posts
    1,827
    A lot of web hosting servers don't allow you to run CGI scripts that you've written yourself, because you could mess up the server.
    Harry.

    "From one thing, know ten thousand things."

  18. #18
    Addicted Member Razzle's Avatar
    Join Date
    Jan 2000
    Location
    Berlin, Germany
    Posts
    161
    Tripod for example does allow you to run your own scripts.
    but it doesn't support all the features (e.q. sendmail)
    Razzle
    ICQ#: 31429438
    What is the difference between a raven?
    -The legs. The length is equal, especially the right one.

  19. #19

    Thread Starter
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    I think it's very reasonable for them to disable sendmail - prevent people from spamming the world through their servers. Yeah, it stops legitimate users, but that's par for the course with stuff like this.
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width