Jump to content

urlencode


tallberg

Recommended Posts

Do you understand what urlencode does? As neil stated, jack would be jack.

 

urlencode basically takes a string that may have bad characters (space single quote double quote ampersand) and converts them to save characters to pass through the url world (space amounts to %20).

 

Just so you know why the above is considered "working".

 

An "encoded" jack. How do you want it encoded?

Link to comment
https://forums.phpfreaks.com/topic/146871-urlencode/#findComment-771125
Share on other sites

Im not sure what you are expecting. urlencode() is for encoding non-alphanumeric characters only into their corresponding hex equivelent.

 

i.e.

$x = "text+1234 abc_99 &?";
$x = urlencode($x);

then decode after passed through url
$y = urldecode($_GET['x']);

Link to comment
https://forums.phpfreaks.com/topic/146871-urlencode/#findComment-771129
Share on other sites

Ok it see. I got the wrong end of the stick.

 

What im doing is making an unsubscribe function to go in newsletters. I don't want a hacker to find my unsubscribe page and unsubscribe a lot of predictable email addresses.

 

Im sure you can see what the encode idea is about.

 

 

 

Link to comment
https://forums.phpfreaks.com/topic/146871-urlencode/#findComment-771139
Share on other sites

Then dont use the email address to unsubscribe members. What you want is a unique lets say 25 character key against the users records in the database. This key is used to unsubscribe the member.

 

i.e. unsubsc.php?key=h65$$3esc55ijgg222jbs76

 

etc

Link to comment
https://forums.phpfreaks.com/topic/146871-urlencode/#findComment-771140
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.