Repost! HELP! mcrypt / fputs problems
| From: | David Rose | Date: | Mon, 31 Jul 2000 16:23:21 +0000 |
| Subject: | Repost! HELP! mcrypt / fputs problems | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-9194@lists.php.net to get a copy of this message | ||
David Rose wrote:
>
> I don't get it.... Here's the code that's relevant to the problem...
> <?
> $SEPERATOR = "\",\""; # "," to seperate values for
> comma-delineated text
> file.
>
> <snipped mysql_etc and fopen(etc)>
>
> while($row = mysql_fetch_array($result))
> {
> $getcardnumber = $row["cardnumber"];
> $cardnumber = mcrypt_ecb(MCRYPT_BLOWFISH, $key,
> base64_decode("$getcardnumber"), MCRYPT_DECRYPT);
>
> fputs ($ExportFile, "\"");
> fputs ($ExportFile, $row["something"].$SEPERATOR);
> fputs ($ExportFile, $cardnumber.$SEPERATOR);
> fputs ($ExportFile, $row["somethingelse"]."\"\n");
>
> }
> ?>
>
> note: I left a lot of what I guess is irrelevant code out of this
> sample. Sample output from the 'export' (where XXXetc is the unencrypted
> card #):
>
> "something","XXXX XXXX XXXX XXXX
>
> notice that the fputs simply stop after outputting the card #.
>
> What's going on here??? Any help will be greatly appreciated. Thanks,
> David Rose.
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net