Jump to content

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.