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 441 to 463

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 5th October 2022 03:05 Europe/London time based on the source file dated 28th June 2022 15:27 Europe/London time.