Professional Web Applications Themes

MySQL and PHP Question - PHP Development

I dont know if this is the right group so here is my question. I have a MySQL database setup and I want to give certain people access to it but I only want them to access it from there computer so I know they haven't given access to friends. The only way I know is to record the ip address to MySQL database and compare at login but that's a problem if the user do not have a static ip. Is there something I can record in the database and compare from the user that never changes if so ...

  1. #1

    Default MySQL and PHP Question

    I dont know if this is the right group so here is my question. I have a
    MySQL database setup and I want to give certain people access to it but I
    only want them to access it from there computer so I know they haven't given
    access to friends. The only way I know is to record the ip address to MySQL
    database and compare at login but that's a problem if the user do not have a
    static ip. Is there something I can record in the database and compare from
    the user that never changes if so how?

    Thanks


    Optonline Guest

  2. #2

    Default Re: MySQL and PHP Question

    Optonline wrote:
     

    Not really a PHP nor a MySQL question.

    Of course it is possible - just not very practical. Browser fingerprinting
    might provide some of the functionality - but is very far from a
    complete/accurate solution. What you could try is:

    1) only allow 1 concurrent login per user (if it's accessed via the
    internet, you can't even assume that a user's IP address will be constant
    throughout a session). You'll probably want to tie in the PHP session
    expiry with the concurrency control.

    2) if it's only running on a LAN, consider usig ident (available for MS too
    - see the squid homepage).

    3) use a one-time password, sent on request to the (registered) users email.
    When they supply that token to a particular page on your site, drop a
    long-lasting cookie on their browser which is required along with
    conventional methods (username+password) to access the page. This can all
    be packaged up in a single URL with a GET query.

    HTH

    C.
    Colin Guest

  3. #3

    Default Re: MySQL and PHP Question

    you can use the HOST NAME.

    "Optonline" <com> a écrit dans le message de news:
    72vRe.156$lga... 


    lowlevel Guest

  4. #4

    Default Re: MySQL and PHP Question

    Is the host name unique for every computer and does it ever change

    Thanks


    "lowlevel" <com> wrote in message
    news:4316ba16$0$7807$free.fr... 
    >
    >[/ref]


    Optonline Guest

  5. #5

    Default Re: MySQL and PHP Question

    no, the host name is not unique, it's a choice...it can change too, but with
    the host name, a user and a password...


    "Optonline" <com> a écrit dans le message de news:
    WAERe.33018$lga... 
    >>
    >>[/ref]
    >
    >[/ref]


    lowlevel Guest

  6. #6

    Default Re: MySQL and PHP Question

    lowlevel wrote:
     [/ref]

    Don't top-post.

    The host name is not unique, but anyway you have no visibility of it from
    the server side. You can see the ip name (if you've got lookups switched on
    - which isn't always a good idea). But it does not follow that the ip
    address the request comes from is the machine on which the page is viewed.

    C.
    Colin Guest

Similar Threads

  1. mySQL SQL Question
    By webspinner in forum Coldfusion Database Access
    Replies: 2
    Last Post: January 11th, 10:57 PM
  2. Question about MySQL 4.0
    By T. Hart in forum PHP Development
    Replies: 0
    Last Post: September 9th, 03:31 AM
  3. PHP - Mysql Question
    By Tiernan in forum PHP Development
    Replies: 0
    Last Post: August 18th, 09:27 AM
  4. Question regarding PHP and mySQL
    By Me@lost_pls_help in forum PHP Development
    Replies: 1
    Last Post: July 27th, 09:57 PM
  5. MySQL question.
    By Steven in forum PHP Development
    Replies: 4
    Last Post: July 6th, 03:15 AM

Bookmarks

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139