Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

curl_unescape(3) [php man page]

CURL_UNESCAPE(3)							 1							  CURL_UNESCAPE(3)

curl_unescape - Decodes the given URL encoded string

SYNOPSIS
string curl_unescape (resource $ch, string $str) DESCRIPTION
This function decodes the given URL encoded string. PARAMETERS
o $ch -A cURL handle returned by curl_init(3). o $str - The URL encoded string to be decoded. RETURN VALUES
Returns decoded string or FALSE on failure. EXAMPLES
Example #1 curl_escape(3) example <?php // Create a curl handle $ch = curl_init('http://example.com/redirect.php'); // Send HTTP request and follow redirections curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); curl_exec($ch); // Get the last effective URL $effective_url = curl_getinfo($ch, CURLINFO_EFFECTIVE_URL); // ie. "http://example.com/show_location.php?loc=M%C3%BCnchen" // Decode the URL $effective_url_decoded = curl_unescape($ch, $effective_url); // "http://example.com/show_location.php?loc=Munchen" // Close the handle curl_close($ch); ?> NOTES
Note curl_unescape(3) does not decode plus symbols (+) into spaces. urldecode(3) does. SEE ALSO
curl_escape(3), urlencode(3), urldecode(3), rawurlencode(3), rawurldecode(3). PHP Documentation Group CURL_UNESCAPE(3)

Check Out this Related Man Page

CURL_INIT(3)								 1							      CURL_INIT(3)

curl_init - Initialize a cURL session

SYNOPSIS
resource curl_init NULL ([string $url]) DESCRIPTION
Initializes a new session and return a cURL handle for use with the curl_setopt(3), curl_exec(3), and curl_close(3) functions. PARAMETERS
o $url - If provided, the CURLOPT_URL option will be set to its value. You can manually set this using the curl_setopt(3) function. Note The file protocol is disabled by cURL if open_basedir is set. RETURN VALUES
Returns a cURL handle on success, FALSE on errors. EXAMPLES
Example #1 Initializing a new cURL session and fetching a web page <?php // create a new cURL resource $ch = curl_init(); // set URL and other appropriate options curl_setopt($ch, CURLOPT_URL, "http://www.example.com/"); curl_setopt($ch, CURLOPT_HEADER, 0); // grab URL and pass it to the browser curl_exec($ch); // close cURL resource, and free up system resources curl_close($ch); ?> SEE ALSO
curl_close(3), curl_multi_init(3). PHP Documentation Group CURL_INIT(3)
Man Page

15 More Discussions You Might Find Interesting

1. Linux

PHP problem

Hi frnds I installed phpmyadmin for OTRS but when ever i tried to open the phpMyAdmin-2.6.2/index.php page i m getting the following error " urldecode the db name if (isset($lightm_db)) { // no longer urlencoded because of html entities in the db name // $db =... (8 Replies)
Discussion started by: naik_mit
8 Replies

2. UNIX for Dummies Questions & Answers

Php

my friend has just made a website which lets you view pages with URL like page=blah.php and stuff, iv tried to explain to him that it's bad becuase people could do page=/etc/passwd but he said he used a shadow file so is np is there anyway this still could be exploited or is he right? (1 Reply)
Discussion started by: ErNci
1 Replies

3. Shell Programming and Scripting

Replace spaces

Hi guys, so I have another issue. Can I use sed to replace spaces in a string or variable with %20 I am having trouble with using curl on URL's containing spaces Thanks! (12 Replies)
Discussion started by: tret
12 Replies

4. UNIX for Dummies Questions & Answers

ReDirecting a URL to another URL - Linux

Hello, I need to redirect an existing URL, how can i do that? There's a current web address to a GUI that I have to redirect to another webaddress. Does anyone know how to do this? This is on Unix boxes Linux. example: https://m45.testing.address.net/host.php make it so the... (3 Replies)
Discussion started by: SkySmart
3 Replies

5. Shell Programming and Scripting

Execute a URL from command window

Hi all, I need to execute a complete URL from command window or shell script. Please any one can help me to. I tried something like # http://www.mysite.com/mypage.php > output.txt but showed some error "http://www.mysite.com/mypage.php not found". My linux system is internet conneted... (5 Replies)
Discussion started by: nissar
5 Replies

6. Shell Programming and Scripting

how to use in bash variables and quotes

I have some troubles with variables and quotes... I want: if $URL is empty (no user input) go to http://www.localhost/index.php/ else add this string (search) "?s=+$URL" EXAMPLE: No user input string= http://www.localhost/index.php/ User input = "unix" string=... (3 Replies)
Discussion started by: aspire
3 Replies

7. Shell Programming and Scripting

decoding URL encoded strings

Hi, I have a couple pages of URL encoded strings that I need to unencode (they were originally in Arabic). So the first step is to unencode the strings and then to translate them to English. They are actually lists of words so the translation from Arabic to English shouldn't be too complicated.... (1 Reply)
Discussion started by: ed111
1 Replies

8. Shell Programming and Scripting

Get password protected URL folder using PHP fopen function

Hi everybody, Please some help over here, I`m pretty new in PHP. I have a cronrefresh php file within a website, I need this script get infornation from a URL of the site. Part of the script where $URL variable appears is: $fdURL = mysql_query("SELECT * FROM affiliSt_config WHERE name... (2 Replies)
Discussion started by: cgkmal
2 Replies

9. Web Development

Passing values in PHP using POST

Lets say that I have a URL that consists of: myserver/something1.php My second URL is myserver/something2.php I have a variable called $var inside something1.php and once I submit the website the $var changes. Now when I do this I want to send this value using POST to something2.php and echo... (1 Reply)
Discussion started by: puttster
1 Replies

10. Shell Programming and Scripting

Php posting help

Hello unix.com I want to use curl to post some logs to a remote server using curl. $ch = curl_init("http://example.com/post/post.php"); curl_setopt($ch, CURLOPT_POST ,1); curl_setopt($ch, CURLOPT_POSTFIELDS ,"FOUT=hash.gif&DATA=$message"); curl_setopt($ch, CURLOPT_HEADER ... (4 Replies)
Discussion started by: galford
4 Replies

11. Red Hat

URL Redirection

Hi Please help, how to setup I have a URL address http://10.XX.XX.XXX:1234/abc/login.jsp - running in linux How to redirect this to http://www.abc.com.ph This way the IP address and port will not be visible to the user many thanks (2 Replies)
Discussion started by: kaibiganmi
2 Replies

12. Shell Programming and Scripting

Using cURL to submit a post form

I am trying to write a shell script to use curl in order to automate downloading data from a website. The URL with the post form is here: http://try-db.org/de/InfoBySpecies.php . I have a list of about 1800 different species I want to check. For Example, choose the first species and use the... (2 Replies)
Discussion started by: hansvg
2 Replies

13. Shell Programming and Scripting

Short command to create two files >{respo,nd}.php (with "tee" command?)

08:29 < xsi> >{respo,nd}.php bash: {respo,nd}.php: ambiguous redirect 08:31 < geirha> xsi: maybe you want tee So I was advised to do so. And I can't create two OR MORE files at once with {a,b,c,d,e,f}.php (which I quickly now need to create and to learn to create in the future to quickly... (2 Replies)
Discussion started by: Xcislav
2 Replies

14. UNIX for Dummies Questions & Answers

Command to get URL under string "SIT"

(9 Replies)
Discussion started by: rockingvj
9 Replies

15. UNIX for Beginners Questions & Answers

Simple for those who know.

Hi, In Php I can use exec() to access the shell from my .php web page. Tested and it works. So, I need to create a cron job that visits my URL at the time contained in my $time php variable. That's it, just one visit to the specific URL. Once the visit takes place, delete the cron job using... (4 Replies)
Discussion started by: jwest100
4 Replies