php Programming Glossary: stream_get_meta_data
Make mp3 seekable PHP http://stackoverflow.com/questions/11340276/make-mp3-seekable-php opts stream fopen file_name 'rb' FALSE context metadata stream_get_meta_data stream data stream_get_contents stream print data fclose stream..
What is the easiest way to use the HEAD command of HTTP in PHP? http://stackoverflow.com/questions/1545432/what-is-the-easiest-way-to-use-the-head-command-of-http-in-php 'HEAD' fd fopen 'http php.net' 'rb' false context var_dump stream_get_meta_data fd fclose fd see also http docs.php.net stream_get_meta_data..
PHP file_get_contents ignoring timeout? http://stackoverflow.com/questions/3689371/php-file-get-contents-ignoring-timeout on detecting read timeouts while reading from it using stream_get_meta_data http php.net stream_get_meta_data share improve this answer..
Getting filename (or deleting file) using file handle http://stackoverflow.com/questions/5144583/getting-filename-or-deleting-file-using-file-handle handle php file share improve this question There is stream_get_meta_data . It works for a stream that you get from tmpfile . If you call.. pointer then you might only get the basename. meta_data stream_get_meta_data stream_or_file_pointer filename meta_data uri echo filename..
How to check if a PHP stream resource is readable or writable? http://stackoverflow.com/questions/5294305/how-to-check-if-a-php-stream-resource-is-readable-or-writable share improve this question Quite simple. Just call stream_get_meta_data resource from your script then check the mode array element.. array element of the return value f fopen file 'r' meta stream_get_meta_data f var_dump meta 'mode' r And if you want to know if the underlying..
best way to determine if a URL is an image in PHP http://stackoverflow.com/questions/676949/best-way-to-determine-if-a-url-is-an-image-in-php 'rb' false ctx if fp return false Problem with url meta stream_get_meta_data fp if meta false fclose fp return false Problem reading data.. You can retrieve the headers from an http response using stream_get_meta_data . Of course this isn't really 100 . Some servers send incorrect..
PHP: get_headers set temporary stream_context http://stackoverflow.com/questions/8429342/php-get-headers-set-temporary-stream-context head share improve this question I ended up using the stream_get_meta_data function to get the HTTP headers. This is how I implemented.. url context assoc 0 fp fopen url 'r' null context metaData stream_get_meta_data fp fclose fp headerLines metaData 'wrapper_data' if assoc return..
|