GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   PHP encryption script nightmare... (https://gfy.com/showthread.php?t=172744)

PigBlimpin' 09-10-2003 02:39 AM

PHP encryption script nightmare...
 
Anyone have a clue why this doesn't work?

http://www.junkiemail.com/encrypt.txt

I'm trying to get xcrypt() to output/return the $decompressed value near the end of the script, while passing 2 settings through the xcrypt() function.

So for instance, I'm trying to get this script to be more modular. It works when it isn't nested within a function, but, I need to be able to call it later in the script with different variables passed to it.

Overview: The script encrypts with $encrypt value=1, and decrypts the encrypted string with a value of 0.

That's all. I just need to be able to call it with a function, and the first value being the text to be encrypted, and second value being if the script is to encrypt(0) or decrypt(1).

My piggy head hurts now.
:glugglug

jwerd 09-10-2003 02:43 AM

First off, the one problem you are going to be having is keep those variables registered inside the function. Simply use

global $a, $b;

That should solve the problems. Basically, the function doesn't understand otherwise. I could go into more details, but I am tired and need sleep. Good luck. I'll take a stab at it in the morning, give me a holla back @ [email protected]

LaterZ

PigBlimpin' 09-10-2003 02:50 AM

Here's a working example...
http://www.junkiemail.com/encrypt.php?a=123456&b=1

where $a = whatever.... and
$b = 1 for "encrypt" or 0 for decrypt.

The source code for this working script is:
http://www.junkiemail.com/encrypt2.txt

Chris 09-10-2003 02:52 AM

english plz

JamesK 09-10-2003 02:58 AM

extreme rabbit fetish

Chris 09-10-2003 03:04 AM

Quote:

Originally posted by Wildcard
extreme rabbit fetish

wanna take over this thread and cyber?


All times are GMT -7. The time now is 12:15 PM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123