PHP - hide url (GET) parameters

前端 未结 7 1387
梦谈多话
梦谈多话 2020-12-06 03:45

I have a link in my PHP/HTML like this:



        
7条回答
  •  温柔的废话
    2020-12-06 04:21

    Agree on and encryption/hash approach (MD5 for example). Then have a reprocessing page that decrypts the message before calling the required script. I'm doing this in php... Just to show you the idea.

    eg. www.mydomain.com/preporcessor.php?request=qouiapfiwe0i9qrr9qyy83r34rqejl

    preprocessor.php (pseudo code)

    $request = $_REQUEST["request"];
    $decrypted = mydecryptfunction($request);
    //$decrypted will now contain: targetpage=login.php?username=abc&password=34453js&location=ABJ...
    //Now you can route the parameters to login.php. 
    

    Note that mydecryptfunction($request) is a function you will create.

提交回复
热议问题