SitePoint Sponsor

User Tag List

Results 1 to 9 of 9

Thread: URL Page Cloak

  1. #1
    SitePoint Member
    Join Date
    Sep 2007
    Posts
    6
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    URL Page Cloak

    Hi all need some help getting a reliable url link cloaker. I need to have a link cloaker place on my webpage and regardless of what page the user browser on my site the url in the address bar will stay the same as I specify in the script. I have no issues if I have to place the scirpt on each page that I want the link cloaked. Can some please help me with this. Thanks

  2. #2
    SitePoint Wizard
    Join Date
    Dec 2003
    Location
    USA
    Posts
    2,582
    Mentioned
    29 Post(s)
    Tagged
    0 Thread(s)
    I recommend doing this in PHP, not Javascript. With Javascript it would be rendered completely useless. If you do go with PHP, try using this at the top of each page:
    Code:
    <?
    session_start();
    if(!session_is_registered("page") || $_SESSION['page'] != "thispage.php")
    {
    session_register("page");
    $_SESSION['page'] = "thispage.php" // Change this for each page.
    header("Location: www.mysite.com");
    }
    ?>
    And then on your index page, have something like:
    Code:
    <?php
    start_session();
    if(session_is_registered("page))
    {
        require_once($_SESSION['page']);
        exit();
    }
    else
    ?>
    <!-- The index HTML here -->
    I think that should work pretty well. If there are any issues, just reply and I'll try to help you out.

  3. #3
    SitePoint Member
    Join Date
    Sep 2007
    Posts
    6
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I dont think my web hosting company allows php scripts. I know java scripts are allowed but not sure about php

  4. #4
    . shoooo... silver trophy logic_earth's Avatar
    Join Date
    Oct 2005
    Location
    CA
    Posts
    9,013
    Mentioned
    8 Post(s)
    Tagged
    0 Thread(s)
    Here is something that will be of great help.

    Just leave it alone! You do not need to do anything so foolish like this!.

    </rant>
    Logic without the fatal effects.
    All code snippets are licensed under WTFPL.


  5. #5
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,863
    Mentioned
    25 Post(s)
    Tagged
    1 Thread(s)
    It can only be done using server side processing. If you don't have server side processing available on your hosting then you can't do it.
    Stephen J Chapman

    javascriptexample.net, Book Reviews, follow me on Twitter
    HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
    <input name="html5" type="text" required pattern="^$">

  6. #6
    SitePoint Member
    Join Date
    Sep 2007
    Posts
    6
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    No it is important becuase I want to set up a pay membership page and I need this as part of the security feature to hide the member url

  7. #7
    . shoooo... silver trophy logic_earth's Avatar
    Join Date
    Oct 2005
    Location
    CA
    Posts
    9,013
    Mentioned
    8 Post(s)
    Tagged
    0 Thread(s)
    If your security requires that then you better rethink your security.
    Also if you are a server that doesn't have server-side processing.
    Then there is no securty, none what so ever with JavaScript.
    Logic without the fatal effects.
    All code snippets are licensed under WTFPL.


  8. #8
    SitePoint Wizard
    Join Date
    Dec 2003
    Location
    USA
    Posts
    2,582
    Mentioned
    29 Post(s)
    Tagged
    0 Thread(s)
    That is very true. Like I said before, if Javascript is disabled, then ANYTHING AND EVERYTHING written in Javascript no longer works.

  9. #9
    SitePoint Member
    Join Date
    Sep 2007
    Posts
    6
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well I guess I have to change webhosting providers or find a third party security company. Well I did the latter there a good one I found called Authpro dont know if any heard about it and if it is any good. Thank for the help guys anyway


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
  •