Jump to content

stewartgd1

New Members
  • Posts

    2
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

stewartgd1's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Good news, had a bit of a fiddle with the encryption routine and all is well.
  2. Although I've been learning php its not what I do and I'm stuck. I want to move the hosting of my site [a href=\"http://www.franceconnections.co.uk\" target=\"_blank\"]FranceConnections[/a] from the current hosts and developers to cutt my costs. But there is a problem. After restoring the backup on another server the site doesn't work quite right. All the pages are there, the navigation etc is fine, all the files look right and the data is all intact. However, when you try and display [b]some[/b] records the dialogue loops back to the home page. First I was told that it was probably due to a security feature that encrypted the URLs but when I pointed out that it only affected some records and pretty well randomly so far as I could see the response was that it was probably to do with the version of php. Well that makes little sense either although the new server is a lot more recent. I have heard rumours that other people who wanted to move never got their sites working again and had to rewrite them so I'm obviously worried. The temporary url is [a href=\"http://www.employment.me.uk/\" target=\"_blank\"]Temp Location[/a] and you will see that even on the home page some of the recent postings loop and some are fine. I have found a function called "encrypted url" and it certainly looks odd but might be harmless - anyone fancy a look? There's a few beers in it for anyone who sorts it. David function encrypted_url($sURL = "") { logg(basename(__FILE__)."[".__FUNCTION__."]", LOWLEVEL); $oEncrypt = new Encryption(); $sNewURL = "?en="; if ($sURL == "") { $sURL = "sREFERER_URL=".$_SERVER['REQUEST_URI']; } else { $sURL = "sREFERER_URL=".$_SERVER['REQUEST_URI']."&".$sURL; } logg("Before Encryption: ".$sURL, LOWLEVEL); // $sNewURL .= rawurlencode($oEncrypt->encrypt(YEK, $sURL, 32)); $sNewURL .= rawurldecode(base64_encode($oEncrypt->encrypt(YEK, $sURL, 64))); logg("After Encryption: ".$sNewURL, LOWLEVEL); return $sNewURL; } function decrypted_url() { logg(basename(__FILE__)."[".__FUNCTION__."]", LOWLEVEL); $oDecrypt = new Encryption(); // $aURLElements = array(); logg("Before Decryption: ".$_GET['en'], LOWLEVEL); if (!isset($_GET['en'])) { return; } // if (($sURL = $oDecrypt->decrypt(YEK, rawurldecode($_GET['en']))) == "") if (($sURL = $oDecrypt->decrypt(YEK, base64_decode(rawurldecode($_GET['en'])))) == "") { return; } $aURL = explode("&", $sURL); foreach ($aURL as $sVal) { $sKey = substr($sVal, 0, strpos($sVal, "=")); global $$sKey; $$sKey = substr($sVal, strpos($sVal, "=")+1); // $aURLElements[$sKey] = substr($sVal, strpos($sVal, "=")+1); logg("After Decryption: ".$sKey."=".$$sKey, LOWLEVEL); } return; }
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.