FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » How to read/to download attachment on an URI?
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: How to read/to download attachment on an URI? [message #172515 is a reply to message #172491] Mon, 21 February 2011 14:12 Go to previous messageGo to previous message
Erwin Moller is currently offline  Erwin Moller
Messages: 228
Registered: September 2010
Karma:
Senior Member
On 2/21/2011 11:59 AM, n00m wrote:
>
> $contents = stream_get_meta_data($handle);
>
> =================================================
>
> Array
> (
> [wrapper_data] => Array
> (
> [0] => HTTP/1.1 200 OK
> [1] => Date: Mon, 21 Feb 2011 10:50:27 GMT
> [2] => Server: Apache
> [3] => Content-disposition: attachment;filename=null.csv
> [4] => Content-Length: 0
> [5] => Connection: close
> [6] => Content-Type: text/plain
> )
>
> [wrapper_type] => http
> [stream_type] => tcp_socket
> [mode] => r
> [unread_bytes] => 0
> [seekable] =>
> [uri] => http://******************************
> [timed_out] =>
> [blocked] => 1
> [eof] =>
> )
>
>
> And what now? How to get the attachment programatically?


Hi,

Maybe something like:

$contents = stream_get_meta_data($handle);
$rawData = file_get_contents($contents["uri"]);

Regards,
Erwin Moller


--
"That which can be asserted without evidence, can be dismissed without
evidence."
-- Christopher Hitchens
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Cake PHP RAD Framework
Next Topic: 500. Turbo Sort
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Mon Oct 07 02:16:21 GMT 2024

Total time taken to generate the page: 0.04006 seconds