English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
(PHP 5 >= 5.5.0)
curl_unescape — تفكك النص الم编码 من خلال URL
string curl_unescape ( resource $ch , string $str )
تفسير النص الم编码 من خلال URL
ملاحظة:لا يمكن لتcurl_unescape() تفكك زر (++) إلى مساحة، يمكن لـ urldecode() القيام بذلك.
ch
الملف CURL الذي يعادته curl_init().
str
النص الم编码
إرجاع النص المفكك أو FALSE إذا فشل.
<?php // إنشاء ملف curl $ch = curl_init('http://example.com/redirect.php'); // إرسال طلب HTTP curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); curl_exec($ch); // الحصول على آخر URL صالح $effective_url = curl_getinfo($ch, CURLINFO_EFFECTIVE_URL); // ie. "http://example.com/show_location.php?loc=M%C3%BCnchen" // تفسير URL $effective_url_decoded = curl_unescape($ch, $effective_url); // "http://example.com/show_location.php?loc=München" // إغلاق الملف curl_close($ch); ?>