# Function php_is_url() not defined

- Thread: https://externals.io/message/32366
- Original archive: https://news-web.php.net/php.internals/32366
- Started by francois.laupretre@ratp.fr on 2007-09-18T11:51:48+00:00
- Messages: 1
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #32366 — francois.laupretre@ratp.fr — 2007-09-18T11:51:48+00:00

URL: https://externals.io/message/32366#32366

Hi,

I am looking for the php_is_url() function. It is documented in Sara's book, declared in main/fopen_wrappers.h, but not defined anywhere.

It was defined in main/fopen_wrappers.c v 1.34 to detect only http/ftp URLs, as they were probably the only possible URLs, and was removed in v 1.107.

If we decide that this function is not available anymore, the declaration must be removed from fopen_wrappers.h. If we want to define it, here is a way to do it :

PHPAPI int php_is_url(const char *path)
{
php_stream_wrapper *wrapper;

wrapper=php_stream_locate_url_wrapper(path, NULL, 0 TSRMLS_CC);
return (wrapper ? wrapper->is_url : 0);
}

Regards

Francois
