Storing binary data within a php script.

From: Date: Sat, 18 Dec 2004 21:05:38 +0000
Subject: Storing binary data within a php script.
Groups: php.general 
Request: Send a blank email to php-general+get-204661@lists.php.net to get a copy of this message
Hi all, Well so far my attempts to make this work have failed so i thought i would try here. What i have is an installation script that has to write a few files to the webserver. Im trying to cut down on the amount of files that need to be uploaded/modified etc. So what im trying to do is include all the data in one file. What the user then uploads and the physical visual basic program activates the script what in turn sets up the web server side. The problem comes when im trying to handle the ascii values for the binary data. "Warning: Unexpected character in input: '' (ASCII=3) state=2." I basicly have 3 questions. 1) Is it possible to store binary data in text form during transport and then using php's file writing functions to output the file? 2) How would i do it as i guess i have to encode the ascii characters but how would i do that? 3)Is there any better ways you suggest me to do this. Im trying to this for two reasons first is to make the application usable by anyone and the second reason is to try to push the boundarys of the langage. I would like anyones comments and views on this please. Any views might help me come to a result. Thanks Jamie

« previous php.general (#204661) next »