06-24-2009
What is the programming language you are using? There is urldecode() in PHP, decodeURIComponent() in Javascript, and other similar functions in other languages. Do make sure the bytes are correct after you get decoded.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I'm trying to replace the string %2d from a text file using sed, and I can't seem to find the right key combination. I've tried:
sed 's/%2d/-/' foo
The above doesn't work, presumably because of the %. :mad: Interestingly, I don't get any kind of error message at all. It appears to... (5 Replies)
Discussion started by: mg1
5 Replies
2. UNIX for Advanced & Expert Users
Hi all,
I need to write a unix script in which need to call a url.
Then need to pass parameters to that url.
please help.
Regards,
gander_ss (1 Reply)
Discussion started by: gander_ss
1 Replies
3. Shell Programming and Scripting
Hi all,
I need to write a unix script in which need to call a url.
Then need to pass parameters to that url.
please help.
Regards,
gander_ss (1 Reply)
Discussion started by: gander_ss
1 Replies
4. Shell Programming and Scripting
I've been trying to figure out how to extract filenames (with extensions) from a variable that contains a series of URL strings that won't necessarily be the same length or contain the same number of paths as part of a bash shell script. For example
#!/bin/bash
... (3 Replies)
Discussion started by: coupestyle
3 Replies
5. Web Development
I am trying to find a way to test some code, but I need to rewrite a specific URL only from a specific HTTP_HOST
The call goes out to
http://SUB.DOMAIN.COM/showAssignment/7bde10b45efdd7a97629ef2fe01f7303/jsmodule/Nevow.Athena
The ID in the middle is always random due to the cookie.
I... (5 Replies)
Discussion started by: EXT3FSCK
5 Replies
6. Shell Programming and Scripting
Could anyone of you please give me some idea to decode base 64 encoded value in ksh? (4 Replies)
Discussion started by: nram_krishna@ya
4 Replies
7. UNIX for Dummies Questions & Answers
Here is what I have so far:
find . -name "*php*" -or -name "*htm*" | xargs grep -i iframe | awk -F'"' '/<iframe*/{gsub(/.\*iframe>/,"\"");print $2}'
Here is an example content of a PHP or HTM(HTML) file:
<iframe src="http://ADDRESS_1/?click=5BBB08\" width=1 height=1... (18 Replies)
Discussion started by: striker4o
18 Replies
8. UNIX for Dummies Questions & Answers
The challenge:
Decode URL's, i.e. convert %HEX to the corresponding special characters, using only UNIX base utilities, and without having to type out each special character.
I have an anonymous C code snippet where the author assigns each hex digit a number from 0 to 16 and then does some... (2 Replies)
Discussion started by: uiop44
2 Replies
9. Shell Programming and Scripting
Hello,
Am very new to perl , please help me here !!
I need help in reading a URL from command line using PERL:: Mechanize and needs all the contents from the URL to get into a file.
below is the script which i have written so far ,
#!/usr/bin/perl
use LWP::UserAgent;
use... (2 Replies)
Discussion started by: scott_cog
2 Replies
10. UNIX for Dummies Questions & Answers
Hello everybody, i have a big issue, i have to decode a big text in base64 a lot of times but there are 2 problems: i am a noob with unix system and shell, and i have problems with openssl and i can't decode anything. can anyone decode for me that base64? need a powerful computer, i can give some... (16 Replies)
Discussion started by: supermarco2020
16 Replies
LEARN ABOUT PHP
rawurlencode
RAWURLENCODE(3) 1 RAWURLENCODE(3)
rawurlencode - URL-encode according to RFC 3986
SYNOPSIS
string rawurlencode (string $str)
DESCRIPTION
Encodes the given string according to RFC 3986.
PARAMETERS
o $str
- The URL to be encoded.
RETURN VALUES
Returns a string in which all non-alphanumeric characters except -_.~ have been replaced with a percent ( %) sign followed by two hex dig-
its. This is the encoding described in RFC 3986 for protecting literal characters from being interpreted as special URL delimiters, and for
protecting URLs from being mangled by transmission media with character conversions (like some email systems).
Note
Prior to PHP 5.3.0, rawurlencode encoded tildes ( ~) as per RFC 1738.
CHANGELOG
+--------+---------------------------------------------------+
|Version | |
| | |
| | Description |
| | |
+--------+---------------------------------------------------+
| 5.3.4 | |
| | |
| | Tilde characters are no longer encoded when |
| | rawurlencode(3) is used with EBCDIC strings. |
| | |
| 5.3.0 | |
| | |
| | Now conforms to RFC 3986. |
| | |
+--------+---------------------------------------------------+
EXAMPLES
Example #1
including a password in an FTP URL
<?php
echo '<a href="ftp://user:', rawurlencode('foo @+%/'),
'@ftp.example.com/x.txt">';
?>
The above example will output:
<a href="ftp://user:foo%20%40%2B%25%2F@ftp.example.com/x.txt">
Or, if you pass information in a PATH_INFO component of the URL:
Example #2
rawurlencode(3) example 2
<?php
echo '<a href="http://example.com/department_list_script/',
rawurlencode('sales and marketing/Miami'), '">';
?>
The above example will output:
<a href="http://example.com/department_list_script/sales%20and%20marketing%2FMiami">
SEE ALSO
rawurldecode(3), urldecode(3), urlencode(3), RFC 3986.
PHP Documentation Group RAWURLENCODE(3)