On Saturday 14 April 2007 09:45, you wrote: > On 4/14/07, Børge Holen <borge@xxxxxxxxxxx> wrote: > > Before mr lynch starts beating up those already dead and probably long > > since burried horses... > > > > Images in a database! > > > > See I was just wondering, and that at times leads to late nights > > I used to read the images from two different files; one watermarked the > > image and one let it throught without any hazzle. > > Of course this kind of script was easy enought to get around the > > watermarking, witch I fixed with the http referer witch as follows IE > > don't send. I don't particulary like ppl who use IE (ups did I upset > > someone?) ;D. > > Hmm, nearly.... I use IE, NOT because i like it, but because i hate > the others more (On windows platform). Sounds so unlikely, didn't know anyone used that crap anymore... I thought everyone switched to tiger linux opensolaris aros etc when viste came out. ;D > > > However I started compressing my scripts and putting them inside one > > file. And the status is so far: > > > > * Query for the image object. > > * Query for copyright check in case of watermarking. If no watermarking > > skip to echo > > * Read the object. > > * put object in a file outside webroot like /tmp. > > * read both the watermark and object > > * merge > > * echo > > > > Is it possible to skip one query and still be able to read ownership from > > a table and at the same time stream the object, witch lead me to the next > > question, I can't seem to be able to make imageCreateFromJPEG handle the > > direct stream, nor that I fetch it in an array, is any of this possible? > > You should fetch the stream manually in a string, and then use > imagecreatefromstring, http://www.php.net/imagecreatefromstring YES FREAKIN PERFECT. > > > As of now I need two files to make this happen. Either I use one file to > > check for rights and download throught a second file (close to the old > > solution) or I try this new thing and end up with one php file witch > > needs the object stream to be saved before it can be managed proberly. > > > > -- > > --- > > Børge > > http://www.arivene.net > > For the rest of your message, i don't understand what you're trying to > do. Show us (parts of) the code you have now, and then explain what > you've wanted to do, and what it does now. Just me blabbering in frustration... my code is now pretty simple. one connection, one query, two results, checks if image is copyrighted. Then with your contribution, prints with or without the watermark. > > Tijnema Thanks -- --- Børge http://www.arivene.net --- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php