Collections functions
Encryption functions
General functions
Theme permission functions
Resource functions

mix_url()

Description

Utility function to scramble a URL

Parameters

ColumnTypeDefaultDescription
$string string - URL to scramble

Return

string

Location

include/migration_functions.php lines 477 to 499

Definition

 
function mix_url($string)
    {
    global 
$mixcache$baseurl;
    if(
trim($string) == "")
        {
        return 
"";
        }
    if(isset(
$mixcache[md5($string)]))
        {
        return 
$mixcache[md5($string)];
        }
    if(
strpos($string"pages") === || strpos($string"/pages") === || strpos($string,$baseurl) === 0)
        {
        
// URL is a relative path within the system, don't scramble
        
return $string;
        }
    if(
strpos($string"://") !== false )
        {
        
$urlparts explode("://"$string);
        return 
$urlparts[0] . "://" mix_text($urlparts[1], false);
        } 
    return 
mix_text($string); 
    }

This article was last updated 10th July 2020 19:35 Europe/London time based on the source file dated 24th June 2020 15:23 Europe/London time.