Professional Web Applications Themes

How do I protect my PHP-script from unauthorized access? - PHP Development

Hello everybody. I have a question about how to protect my PHP-script from all unauthorized access. I have a PHP-script on my web server and this PHP-script should only be accessible from _one_ IP-address. Right now I am using "$_SERVER['REMOTE_ADDR']" to check if the person that wishes to access my PHP-script is authorized or not but I believe that this is quite easily cirvented… Are there other ways to prevent anyone from accessing my PHP-script (except the from the one IP-address that is authorized)?? Is there maybe a way to do this with a firewall? I am using Linux on ...

  1. #1

    Default How do I protect my PHP-script from unauthorized access?

    Hello everybody.

    I have a question about how to protect my PHP-script from all
    unauthorized access. I have a PHP-script on my web server and this
    PHP-script should only be accessible from _one_ IP-address.

    Right now I am using "$_SERVER['REMOTE_ADDR']" to check if the person
    that wishes to access my PHP-script is authorized or not but I believe
    that this is quite easily cirvented…

    Are there other ways to prevent anyone from accessing my PHP-script
    (except the from the one IP-address that is authorized)?? Is there
    maybe a way to do this with a firewall? I am using Linux on the server
    by the way.

    Kindly
    Gabriel
    Gabriel Guest

  2. #2

    Default Re: How do I protect my PHP-script from unauthorized access?

    On 8 Jul 2003 04:07:45 -0700, Gabriel hath writ:
    >
    > I have a question about how to protect my PHP-script from all
    > unauthorized access. I have a PHP-script on my web server and this
    > PHP-script should only be accessible from _one_ IP-address.
    >
    > Right now I am using "$_SERVER['REMOTE_ADDR']" to check if the person
    > that wishes to access my PHP-script is authorized or not but I believe
    > that this is quite easily cirvented…
    >
    > Are there other ways to prevent anyone from accessing my PHP-script
    > (except the from the one IP-address that is authorized)?? Is there
    > maybe a way to do this with a firewall? I am using Linux on the server
    > by the way.
    .htaccess

    |<files special-secret-secure.php>
    |order deny,allow
    |deny from all
    |allow from 999.999.999.999
    |</files>

    Jonesy
    --
    | Marvin L Jones | jonz | W3DHJ | OS/2
    | Gunnison, Colorado | | Jonesy | linux __
    | 7,703' -- 2,345m | config.com | DM68mn SK
    Allodoxaphobia Guest

  3. #3

    Default Re: How do I protect my PHP-script from unauthorized access?

    >
    > .htaccess
    >
    > |<files special-secret-secure.php>
    > |order deny,allow
    > |deny from all
    > |allow from 999.999.999.999
    > |</files>
    >
    > Jonesy
    That did the trick! Thank you both for your answers. Goldstars will be
    rewarded to you :)

    /Gabriel
    Gabriel Guest

  4. #4

    Default Re: How do I protect my PHP-script from unauthorized access?

    On 9 Jul 2003 10:05:26 -0700, Gabriel hath writ:
    >>
    >> .htaccess
    >>
    >> |<files special-secret-secure.php>
    >> |order deny,allow
    >> |deny from all
    >> |allow from 999.999.999.999
    >> |</files>
    >>
    > That did the trick! Thank you both for your answers. Goldstars will be
    > rewarded to you :)
    >
    > /Gabriel
    It's not often that I am of much help to anyone.
    Kinda brightens my day when I am.
    Glad to help.
    Jonesy
    --
    | Marvin L Jones | jonz | W3DHJ | OS/2
    | Gunnison, Colorado | | Jonesy | linux __
    | 7,703' -- 2,345m | config.com | DM68mn SK
    Allodoxaphobia Guest

Similar Threads

  1. Protecting remote CFCs from unauthorized access
    By SEJ-69 in forum Coldfusion Flash Integration
    Replies: 3
    Last Post: June 5th, 11:27 AM
  2. ASP script between XML and Access Database, HELP!
    By flashy developer in forum Macromedia Flash Data Integration
    Replies: 0
    Last Post: August 6th, 01:20 PM
  3. restrict access to a script
    By Denis in forum PHP Development
    Replies: 2
    Last Post: June 13th, 12:41 AM
  4. How do you protect your Web Service from unauthorized access?
    By aurelius in forum ASP.NET Web Services
    Replies: 0
    Last Post: September 26th, 04:13 PM
  5. Replies: 2
    Last Post: June 26th, 12:41 PM

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