PHP Doku:: Encode a URI to RFC 3986 - function.oauth-urlencode.html

Verlauf / Chronik / History: (8) anzeigen

Sie sind hier:
Doku-StartseitePHP-HandbuchFunktionsreferenzWeb ServicesOAuthOAuth Funktionenoauth_urlencode

Ein Service von Reinhard Neidl - Webprogrammierung.

OAuth Funktionen

<<oauth_get_sbs

The OAuth class>>

oauth_urlencode

(PECL OAuth >=0.99.2)

oauth_urlencodeEncode a URI to RFC 3986

Beschreibung

string oauth_urlencode ( string $uri )

Encodes a URI to » RFC 3986.

Parameter-Liste

uri

URI to encode.

Rückgabewerte

Returns an » RFC 3986 encoded string.


Ein BenutzerBeitrag:
- Beiträge aktualisieren...
bohwaz
30.03.2010 17:20
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;
}

?>



PHP Powered Diese Seite bei php.net
The PHP manual text and comments are covered by the Creative Commons Attribution 3.0 License © the PHP Documentation Group - Impressum - mail("TO:Reinhard Neidl",...)