PHP 5.4.31 Released

oauth_urlencode

(PECL OAuth >=0.99.2)

oauth_urlencodeCódifica una URI a RFC 3986

Descripción

string oauth_urlencode ( string $uri )

Códifica una URI a » RFC 3986.

Parámetros

uri

URI a codificar.

Valores devueltos

Returns an » RFC 3986 encoded string.

add a note add a note

User Contributed Notes 1 note

up
2
bohwaz
4 years ago
Note that php5.3 rawurlencode will do exactly the same thing.

For PHP 5.2, easy replacement to this function :

<?php

function rfc3986_encode($str)
{
 
$str = rawurlencode($str);
 
$str = str_replace('%E7', '~', $str);
  return
$str;
}

?>
To Top