Collections functions
General functions
Render 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 419 to 441

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 24th May 2022 19:05 Europe/London time based on the source file dated 27th April 2022 12:20 Europe/London time.