Welcome Forums Aliases urldecode – Decodes characters in a website address

This topic contains 0 replies, has 1 voice, and was last updated by  bleepy 2 years, 5 months ago.

  • Author
    Posts
  • #444

    bleepy
    Keymaster

    Description:
    Converts a string from URL-safe to ‘normal’ characters, e.g. %20 becomes a space, etc.

    Usage:
    $urldecode(string)

    Example:
    $urldecode(http%3A%2F%2Fwww%2Edalnethd%2Eorg%2Findex%2Ephp)

    Code:
    alias urldecode { return $replace($regsubex($1-,/%(\w\w)/g,$chr($iif($base(\t,16,10) != 32,$v1,1))),$chr(1),$chr(32)) }

The forum ‘Aliases’ is closed to new topics and replies.