Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 8 of 8

Thread: Hiding the URL.

  1. #1
    New Coder
    Join Date
    Aug 2010
    Posts
    20
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Arrow Hiding the URL.

    I have a .php webpage. and I need the top url to be hidden for whoever goes to the webpage cant copy the url and visit again.


    please help me.


    my website is a cms

  • #2
    Senior Coder DJCMBear's Avatar
    Join Date
    Mar 2010
    Location
    United Kindom
    Posts
    1,173
    Thanks
    14
    Thanked 136 Times in 136 Posts
    You should make a system to only allow the link to be used once and only once or if you want the user to use it once but again later on then set a lime limiter for example once they go to it then they have to wait 30mins lets say till they can use it again.
    Official BinPress hand picked coder.
    For anyone worried about SQL injection go have a look at my small yet powerful script here.
    Go Pledge for Light Table, if it hit's $300,000 Python and other languages will get added.
    I am 1 of 65,608 people to get a Pebble Watch :P

  • #3
    New Coder
    Join Date
    Aug 2010
    Posts
    20
    Thanks
    0
    Thanked 0 Times in 0 Posts
    no not that

  • #4
    Senior Coder DJCMBear's Avatar
    Join Date
    Mar 2010
    Location
    United Kindom
    Posts
    1,173
    Thanks
    14
    Thanked 136 Times in 136 Posts
    Do you mean how to make the browser address bar not display the path to the current file?
    Official BinPress hand picked coder.
    For anyone worried about SQL injection go have a look at my small yet powerful script here.
    Go Pledge for Light Table, if it hit's $300,000 Python and other languages will get added.
    I am 1 of 65,608 people to get a Pebble Watch :P

  • #5
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Location
    Saskatoon, Saskatchewan
    Posts
    16,994
    Thanks
    4
    Thanked 2,662 Times in 2,631 Posts
    You cannot hide a url, not even with a JS property. The client can ALWAYS determine where they are. Always.
    The only way to do this is to use a one shot url or background loading with curl, or soap, or something along that lines.
    Don't forget that PHP cannot in any way interact with a client's browser. PHP does not care if the client is a web browser or any other type of software. It only cares about input and output on the provided ports, which yes is generally shared with the webserver.
    PHP Code:
    header('HTTP/1.1 420 Enhance Your Calm'); 
    Been gone for a few months, and haven't programmed in that long of a time. Meh, I'll wing it ;)

  • #6
    Senior Coder DJCMBear's Avatar
    Join Date
    Mar 2010
    Location
    United Kindom
    Posts
    1,173
    Thanks
    14
    Thanked 136 Times in 136 Posts
    Quote Originally Posted by Fou-Lu View Post
    You cannot hide a url, not even with a JS property. The client can ALWAYS determine where they are. Always.
    The only way to do this is to use a one shot url or background loading with curl, or soap, or something along that lines.
    Don't forget that PHP cannot in any way interact with a client's browser. PHP does not care if the client is a web browser or any other type of software. It only cares about input and output on the provided ports, which yes is generally shared with the webserver.
    That's why I suggested a one use URL or a timed URL so in a way it is hidden if by hidden the meaning is no one but the first person who sees the link will be able to use it and no one else can.
    Official BinPress hand picked coder.
    For anyone worried about SQL injection go have a look at my small yet powerful script here.
    Go Pledge for Light Table, if it hit's $300,000 Python and other languages will get added.
    I am 1 of 65,608 people to get a Pebble Watch :P

  • #7
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Location
    Saskatoon, Saskatchewan
    Posts
    16,994
    Thanks
    4
    Thanked 2,662 Times in 2,631 Posts
    Quote Originally Posted by DJCMBear View Post
    That's why I suggested a one use URL or a timed URL so in a way it is hidden if by hidden the meaning is no one but the first person who sees the link will be able to use it and no one else can.
    Yep, very much like a password reset feature or something of the sorts.
    I honestly can't see a reason to otherwise hide a url.
    PHP Code:
    header('HTTP/1.1 420 Enhance Your Calm'); 
    Been gone for a few months, and haven't programmed in that long of a time. Meh, I'll wing it ;)

  • #8
    Senior Coder DJCMBear's Avatar
    Join Date
    Mar 2010
    Location
    United Kindom
    Posts
    1,173
    Thanks
    14
    Thanked 136 Times in 136 Posts
    You could try htaccess as this allows you to mod the URL to hide the real path but it still won't stop the user reusing the link as Fou-Lu said the user will know where they are at all times.
    Official BinPress hand picked coder.
    For anyone worried about SQL injection go have a look at my small yet powerful script here.
    Go Pledge for Light Table, if it hit's $300,000 Python and other languages will get added.
    I am 1 of 65,608 people to get a Pebble Watch :P


  •  

    Posting Permissions

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