Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

curl_easy_escape(3) [osx man page]

curl_easy_escape(3)						  libcurl Manual					       curl_easy_escape(3)

NAME
curl_easy_escape - URL encodes the given string SYNOPSIS
#include <curl/curl.h> char *curl_easy_escape( CURL *curl, char *url, int length ); DESCRIPTION
This function converts the given input string to an URL encoded string and returns that as a new allocated string. All input characters that are not a-z, A-Z, 0-9, '-', '.', '_' or '~' are converted to their "URL escaped" version (%NN where NN is a two-digit hexadecimal num- ber). If the length argument is set to 0 (zero), curl_easy_escape(3) uses strlen() on the input url to find out the size. You must curl_free(3) the returned string when you're done with it. AVAILABILITY
Added in 7.15.4 and replaces the old curl_escape(3) function. RETURN VALUE
A pointer to a zero terminated string or NULL if it failed. SEE ALSO
curl_easy_unescape(3), curl_free(3), RFC2396 libcurl 7.15.4 7 April 2006 curl_easy_escape(3)

Check Out this Related Man Page

curl_easy_escape(3)						  libcurl Manual					       curl_easy_escape(3)

NAME
curl_easy_escape - URL encodes the given string SYNOPSIS
#include <curl/curl.h> char *curl_easy_escape( CURL *curl, char *url, int length ); DESCRIPTION
This function converts the given input string to an URL encoded string and returns that as a new allocated string. All input characters that are not a-z, A-Z, 0-9, '-', '.', '_' or '~' are converted to their "URL escaped" version (%NN where NN is a two-digit hexadecimal num- ber). If the length argument is set to 0 (zero), curl_easy_escape(3) uses strlen() on the input url to find out the size. You must curl_free(3) the returned string when you're done with it. AVAILABILITY
Added in 7.15.4 and replaces the old curl_escape(3) function. RETURN VALUE
A pointer to a zero terminated string or NULL if it failed. SEE ALSO
curl_easy_unescape(3), curl_free(3), RFC2396 libcurl 7.15.4 7 April 2006 curl_easy_escape(3)
Man Page

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Replacing one Char in a string of variable length

Hi all, I am trying to find the best way of making a change to 1 char in a string, the string can be between 1 and 14 characters. I am reading a line in from a file which contains 012341231231:2:102939283:NNN: Require :NBN: 012838238232:3:372932:NNN: Require :NNB: I need to change 1 N or a... (8 Replies)
Discussion started by: nkwilliams
8 Replies

2. Shell Programming and Scripting

curl doesn't work in browser

Hi I need once again you help guys, I have a php script that should call and url on the local-server, when i call the script from the browser it just prints the $str and it doesn't call the url, but when i execute the script from the shell (php sentdata.php) it works. I checked the apache... (6 Replies)
Discussion started by: tafil
6 Replies

3. Programming

How to find length of string and pass into char array in C?

Hi All I want to take a Hexadecimal number as input and i want to find lenth of the input and pass it to char s ( char s ). I have a program to convert hexadecial to binary but it is taking limited input but i want to return binary number based on input. How? (1 Reply)
Discussion started by: atharalikhan
1 Replies

4. Shell Programming and Scripting

Downloading of dynamically generated URL using curl and sed

I've been attempting to use curl and sed to allow for downloading a file from a dynamically generated URL. I've been able to retrieve and save the HTML of the page that does the dynamic generation of the download URL using curl but I'm very new to sed and I seem to be stuck at this part. HTML: ... (1 Reply)
Discussion started by: schwein
1 Replies

5. Programming

Fastest way to find the length of string in c

Hi all, We use strlen() fun provided by library to find the length of a string. Looking inside of it, it has some different mechanism to find the length of string. Normally, we scan the string byte by byte until the '\0' character. It takes a logn time to count length. The Library strlen()... (2 Replies)
Discussion started by: yogeshrl9072
2 Replies

6. Shell Programming and Scripting

curl misbehaving

Hi friends, I have a text file of the following kind input.txt -o abc.pdf "pdfmyurl.com?url=http://www.abc.com" I am using this command for i in `cat input.txt`; do curl $i; done It is giving the error try 'curl --help' or 'curl --manual' for more information Any... (5 Replies)
Discussion started by: jacobs.smith
5 Replies

7. Shell Programming and Scripting

How to Parse the XML data along with the URL in Shell Script?

Hi, Can anybody help to solve this. I want to parse some xmldata along with the URL in the Shell. I'm calling the URL via the curl command Given below is my shell script file export... (7 Replies)
Discussion started by: Megala
7 Replies

8. UNIX for Dummies Questions & Answers

Read URL data from UNIX without wget,curl,lynx,w3m.

Hi Experts, Problem statement : We have an URL for which we need to read the data and get parsed inside the shell scripts. My Aix has very limited perl utility, i cant install any utility as well. Precisely, wget,cURL,Lynx,w3m and Lwp cant be used as i got these utilities only when i googled... (0 Replies)
Discussion started by: scott_cog
0 Replies

9. Shell Programming and Scripting

Use curl to send a static xml file using url encoding to a web page using pos

Hi I am try to use curl to send a static xml file using url encoding to a web page using post. This has to go through a particular port on our firewall as well. This is my first exposure to curl and am not having much success, so any help you can supply, or point me in the right direction would be... (1 Reply)
Discussion started by: Paul Walker
1 Replies

10. Shell Programming and Scripting

Using CURL command with special characters in URL

Hi. I 'm trying to hit a REST api and retrieve a JSON feed, and the URL has special characters in it. Something like: Example Domain The below curl command is failing curl -X GET https://www.example.com/?sample=name&id=1001 saying bad command at id=1001 I am going to use this as part... (3 Replies)
Discussion started by: kumarjt
3 Replies