diff options
| author | Ilia Alshanetsky <iliaa@php.net> | 2003-02-07 21:33:35 +0000 |
|---|---|---|
| committer | Ilia Alshanetsky <iliaa@php.net> | 2003-02-07 21:33:35 +0000 |
| commit | b1a6778fe52a6a8514db903adb72a03d83051886 (patch) | |
| tree | 73825cb81f0538ff0cf6a6a061f9d9ad60798a0f /main/streams.c | |
| parent | 598e82751d0dd9bd228167d262a09d26d6459f54 (diff) | |
| download | php-git-b1a6778fe52a6a8514db903adb72a03d83051886.tar.gz | |
Added get_browser() function. This function can be used to fetch the headers
sent by the server when a request is made for a given URL.
Diffstat (limited to 'main/streams.c')
| -rwxr-xr-x | main/streams.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/main/streams.c b/main/streams.c index a1fa323df4..5ed18c6d11 100755 --- a/main/streams.c +++ b/main/streams.c @@ -2379,6 +2379,10 @@ PHPAPI php_stream *_php_stream_open_wrapper_ex(char *path, char *mode, int optio path_to_open = path; wrapper = php_stream_locate_url_wrapper(path, &path_to_open, options TSRMLS_CC); + if (options & STREAM_USE_URL && (!wrapper || !wrapper->is_url)) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "This function may only be used against URLs."); + return NULL; + } if (wrapper) { |
