![]() |
![]() |
![]() |
||||
Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact us. |
![]() ![]() |
|
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed. |
|
Thread Tools |
![]() |
#1 |
Confirmed User
Join Date: Jan 2001
Location: Montreal
Posts: 1,830
|
encrypting address bar string with php
I need to encrypt a string in the status bar so that I can pass
?string=798&Wwehkl3elkjdslade instead of something like ?info1=true&info2=false&info3=true NOW.... I need to know what encrypting language I need to use.. I was gonna use mcrypt... but it seems des and all the other encrypting things I used create some weird characters... I need to pass it through the browser address bar, so it needs to be numbers and letters... can anyone guide me with this please?
__________________
![]() Stunner Media Programs: StandAhead | IndieBucks | BoyCrushCash | Phoenixxx | EmoProfits | BritishBucks | HunkMoney | LatinoBucks Make $$$ with Gay! Lowest Minimum Payouts in the Business, Perfect Track Record, Amazing Sites |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#2 |
Confirmed User
Industry Role:
Join Date: Oct 2002
Location: lalaland
Posts: 2,120
|
for what purpose?
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#3 |
Confirmed User
Industry Role:
Join Date: Sep 2002
Location: Los Angeles, CA
Posts: 1,366
|
.
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#4 |
Confirmed User
Join Date: Aug 2002
Posts: 1,888
|
Will urlencode() work?
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#5 |
Confirmed User
Join Date: Jan 2001
Location: Montreal
Posts: 1,830
|
I wanna build a page where I pass my page's options through the url.... BUT, I don't want to have the surfers able to modify the page by changing what's in the top
__________________
![]() Stunner Media Programs: StandAhead | IndieBucks | BoyCrushCash | Phoenixxx | EmoProfits | BritishBucks | HunkMoney | LatinoBucks Make $$$ with Gay! Lowest Minimum Payouts in the Business, Perfect Track Record, Amazing Sites |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#6 |
Confirmed User
Join Date: Jan 2001
Location: Montreal
Posts: 1,830
|
I believe urlencode is only to change spaces with something else or something.....
__________________
![]() Stunner Media Programs: StandAhead | IndieBucks | BoyCrushCash | Phoenixxx | EmoProfits | BritishBucks | HunkMoney | LatinoBucks Make $$$ with Gay! Lowest Minimum Payouts in the Business, Perfect Track Record, Amazing Sites |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#7 |
Confirmed User
Join Date: Mar 2001
Location: Cat Detector Van
Posts: 1,600
|
urlencode the results the crypt returns.
Edit: On second thought, this is a really dumb suggestion. Don't bother with this at all - use sessions for this. It's a much better way of doing what you want. Cheers, Backov
__________________
<embed src="http://banners.spotbrokers.com/button.swf" FlashVars="clickURL=http://banners.spotbrokers.com" quality=high pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="120" height="60"></embed> |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#8 |
Confirmed User
Join Date: Jan 2001
Location: Montreal
Posts: 1,830
|
hey backov...
yeah, that's what I was thinking... but it makes a huge freakin' url though LOL.... there's no encryption/decryption package that uses letters and numbers only?
__________________
![]() Stunner Media Programs: StandAhead | IndieBucks | BoyCrushCash | Phoenixxx | EmoProfits | BritishBucks | HunkMoney | LatinoBucks Make $$$ with Gay! Lowest Minimum Payouts in the Business, Perfect Track Record, Amazing Sites |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#9 |
Confirmed User
Join Date: Jan 2001
Location: Montreal
Posts: 1,830
|
I'm a rookie at php my friend ;)
what do you mean with sessions.. you mean session_encode ?
__________________
![]() Stunner Media Programs: StandAhead | IndieBucks | BoyCrushCash | Phoenixxx | EmoProfits | BritishBucks | HunkMoney | LatinoBucks Make $$$ with Gay! Lowest Minimum Payouts in the Business, Perfect Track Record, Amazing Sites |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#10 |
Confirmed User
Join Date: May 2002
Location: CT
Posts: 5,246
|
Use Sessions
![]() |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#11 |
Registered User
Join Date: Oct 2002
Posts: 94
|
Use a hash of the values combined with a secret key.
var1=foo&var2=bar&var3=baz&key=3837s7743 in the php, do something like. generate key: $key = crypt("var1=foo&bar2=bar&var3=baz" . $mysecretkey) check: if ($key == crypt("var1=$var1&var2=$var2&var3=$var3" . $mysecretkey)) { // good value } else { //bad value, someone chaned something } Unless they know your secret key, they can't change the values, without screwing up the key. (which is basically just a checksum of the values they originally had) Of course, sessions is probably a better solution. And if you're sure the users support cookies, they can be done through cookies alone, not using the ugly urls.
__________________
<A HREF="http://www.jesussmut.com/"> <IMG SRC="http://www.jesussmut.com/images/jesusbutton1.gif" BORDER=0> </A><br> Have a look at <A HREF="http://www.jesussmut.com/">JesusSmut</A> |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#12 | |
Confirmed User
Join Date: May 2002
Location: CT
Posts: 5,246
|
Quote:
http://codewalkers.com/tutorials.php?show=32 read it |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#13 |
Confirmed User
Join Date: Jan 2001
Location: Montreal
Posts: 1,830
|
yeah, the key thing is a solution
![]() thanks for all the info guys... will find it out I guess ;)
__________________
![]() Stunner Media Programs: StandAhead | IndieBucks | BoyCrushCash | Phoenixxx | EmoProfits | BritishBucks | HunkMoney | LatinoBucks Make $$$ with Gay! Lowest Minimum Payouts in the Business, Perfect Track Record, Amazing Sites |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#14 | |
Confirmed User
Join Date: Feb 2002
Location: vancouver, bc
Posts: 963
|
Quote:
encrypt it with mcrytp, the use bin2hex and pass the hex value .. then use hex2bin before you unencrypt it here .. bin2hex is built in function encrypt($key, $data) { $plain_text = trim($data); $iv = substr(md5($key), 0,mcrypt_get_iv_size (MCRYPT_CAST_256,MCRYPT_MODE_CFB)); $c_t = mcrypt_encrypt (MCRYPT_CAST_256, $key, $plain_text, "cfb", $iv); return trim(chop(base64_encode($c_t))); } function decrypt($key, $c_t) { $c_t = trim(chop(base64_decode($c_t))); $iv = substr(md5($key), 0,mcrypt_get_iv_size (MCRYPT_CAST_256,MCRYPT_MODE_CFB)); $p_t = mcrypt_decrypt (MCRYPT_CAST_256, $key, $c_t, "cfb", $iv); return trim(chop($p_t)); } function hex2bin($data) { $len = strlen($data); for ($i=0;$i<$len;$i+=2) { $newdata .= pack("C",hexdec(substr($data,$i,2))); } return $newdata; } |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#15 |
Confirmed User
Join Date: Jan 2001
Location: Montreal
Posts: 1,830
|
xroach, thanks a lot dude...
that made my day ;)
__________________
![]() Stunner Media Programs: StandAhead | IndieBucks | BoyCrushCash | Phoenixxx | EmoProfits | BritishBucks | HunkMoney | LatinoBucks Make $$$ with Gay! Lowest Minimum Payouts in the Business, Perfect Track Record, Amazing Sites |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#16 | |
Confirmed User
Join Date: Feb 2002
Location: vancouver, bc
Posts: 963
|
Quote:
no worries ![]() |
|
![]() |
![]() ![]() ![]() ![]() ![]() |