Hi!
Very new to unix stuff, and this is my first post to the forum. I'm pretty sure I know enough to know I know nothing, so please be patient with me and don't laugh too hard.
Ok, I've got an old computer and a laptop - the old computer was bought in the mid 90's it's still running windows... (1 Reply)
I have added a new experimental "Computer Science and Mathematics Trivia - True or False" section in the discussions, currently under the tags box.
In the future, I plan to
Expand this feature to add more trivia categories from math, science and technology.
Keep track of correct and... (20 Replies)
The UNIX and Linux Forums now has over 1000 TRUE / FALSE computer science and computer related trivia question in our database. These questions are of relatively high quality (compared to similar sites on the web) and are fun (according to feedback by users). In the first week during the... (1 Reply)
Thanks to Akshay, who helped me write the core MySQL queries, we now have two new draft leaderboards, by (1) member and by (2) country:
https://www.unix.com/trivia_stats.php
Currently milhan leads the members with a high score of 90%:
... (3 Replies)
Only a few days after I coded this new feature from scratch, we are seeing over 3000 entries in the database from members (mostly guests) playing CS trivia.
I have spend a lot of time coding this (from scratch) and testing the API. From the logs, it seems to have an API bug which appears... (31 Replies)
Discussion started by: Neo
31 Replies
LEARN ABOUT PHP
rawurlencode
RAWURLENCODE(3) 1 RAWURLENCODE(3)rawurlencode - URL-encode according to RFC 3986SYNOPSIS
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)