Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:30890 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 52189 invoked by uid 1010); 13 Jul 2007 13:03:04 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 52174 invoked from network); 13 Jul 2007 13:03:04 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 13 Jul 2007 13:03:04 -0000 Authentication-Results: pb1.pair.com smtp.mail=adrian.drumea@sysmart.com; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=adrian.drumea@sysmart.com; sender-id=unknown Received-SPF: error (pb1.pair.com: domain sysmart.com from 207.176.140.225 cause and error) X-PHP-List-Original-Sender: adrian.drumea@sysmart.com X-Host-Fingerprint: 207.176.140.225 d0b0.interspots.com Linux 2.5 (sometimes 2.4) (4) Received: from [207.176.140.225] ([207.176.140.225:58190] helo=d0b0.interspots.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 72/22-32782-50877964 for ; Fri, 13 Jul 2007 09:03:03 -0400 Received: from server (unverified [89.122.75.248]) by d0b0.interspots.com (SurgeMail 3.7b6) with ESMTP id 5082808 for ; Fri, 13 Jul 2007 06:07:59 -0700 To: Date: Fri, 13 Jul 2007 16:02:40 +0300 Message-ID: <001301c7c54e$1a982cd0$0200000a@server> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 Thread-Index: AcfFThgz++evPcl+Rhucy3y275tvzw== X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3138 X-Server: High Performance Mail Server - http://surgemail.com r=-1569771868 X-Authenticated-User: adrian.drumea@sysmart.com Subject: Memory streams From: adrian.drumea@sysmart.com ("Adrian Drumea") Hello, I'm new to this list, so I aplogize if this is not the place to post this message. I was using today the getimagesize() function which takes a file name. I was trying to take the size of an image decoded using base64_decode from a string. So I have my decoded data in $data. Now to apply getimagesize() I need a file, so I saved $data to a temporary file and everything worked. I then tried to avoid the temporary file by using i/o streams, but I didn't manage to do this. Correct me if I am wrong, but from what I see there is no way to create a memory stream using php://memory and also attach a unique key to it. If that would be possible, I could create a memory stream with a unique key, write the data into it and then pass this memory stream name to the getimagesize() function. In this way, all functions requiring a file could be used on a memory buffer. Adrian Drumea