Urlencoding Question
Moderator: General Moderators
Urlencoding Question
Hello,
I am trying to pass a link from siteA to siteB in the format below:
http://www.siteB.com/my.php?e%3D%16%84% ... 5%B7%5D%A3
This string is a blowfish encrypted string that I am trying to send over from siteA to siteB. I've encoded the URL because of all the special characters. On siteB I am trying to do a echo $_REQUEST['e'], but there is no value for 'e' when the URL is passed. Do I have to decode it first? And if so, can someone help me understand the process?
Regards,
-Ptek
I am trying to pass a link from siteA to siteB in the format below:
http://www.siteB.com/my.php?e%3D%16%84% ... 5%B7%5D%A3
This string is a blowfish encrypted string that I am trying to send over from siteA to siteB. I've encoded the URL because of all the special characters. On siteB I am trying to do a echo $_REQUEST['e'], but there is no value for 'e' when the URL is passed. Do I have to decode it first? And if so, can someone help me understand the process?
Regards,
-Ptek
Maybe it will work ...
http://www.siteB.com/my.php?e=%3D%16%84 ... 5%B7%5D%A3
http://www.siteB.com/my.php?e=%3D%16%84 ... 5%B7%5D%A3
There are 10 types of people in this world, those who understand binary and those who don't
Sample Site
VladSun,
The url I supplied is an example. I'm trying not to publish the customer's site because I am working on a security detail. I need help with the concept of urldecoding urlencoded data passed in a url.
-Ptek
The url I supplied is an example. I'm trying not to publish the customer's site because I am working on a security detail. I need help with the concept of urldecoding urlencoded data passed in a url.
-Ptek
- CoderGoblin
- DevNet Resident
- Posts: 1425
- Joined: Tue Mar 16, 2004 10:03 am
- Location: Aachen, Germany
Actually!
feyd | Please use
feyd | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
This is my test. am I encoding the wrong thing?Code: Select all
$encr = new pcrypt(MODE_ECB, "BLOWFISH", "secretkey");
$test = $encr->encrypt("This is Ptek");
$link = "e=$test";
$val = urlencode($link);
echo "$val<br>";
echo "<a href=http://www.siteB.com/my.php?$val>Click Me</a>";feyd | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
Last edited by phibertek on Wed Aug 29, 2007 10:18 am, edited 1 time in total.
Nevermind, I seee
Thanx! Yes, it works! Thank you for pointing that out!
-Ptek
-Ptek
Last edited by phibertek on Wed Aug 29, 2007 10:23 am, edited 1 time in total.
Yes, it's wrong 
Code: Select all
$encr = new pcrypt(MODE_ECB, "BLOWFISH", "secretkey");
$test = $encr->encrypt("This is Mark");
$val = "e=" . urlencode($test);
echo "$val<br>";
echo "<a href=http://www.siteB.com/my.php?$val>Click Me</a>";There are 10 types of people in this world, those who understand binary and those who don't