# how can I check the url's validity

- Thread: https://externals.io/message/44033
- Original archive: https://news-web.php.net/php.internals/44033
- Started by jackywdx on 2009-05-21T05:48:41+00:00
- Messages: 2
- 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

---

## #44033 — jackywdx — 2009-05-21T05:48:41+00:00

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

hi all:
I have a problem, I wonder if there is any good way to check the url's validity.
For example, the url: http://diybbs.enet.com.cn/thread-3004314-1-1.html 
How can I check whether the page exsist, meaning it has content, not 404.
My server's php version is PHP4.3.9, quite low, and doesn't  have curl extension.
I have try fsockopen, fopen. But it's not effective enough, a bit slow.
I wonder if there is some functions or some ways to quickly detemine whether the url is valid.
Thanks.

---

## #44034 — crrodriguez@suse.de — 2009-05-21T12:07:18+00:00

URL: https://externals.io/message/44033#44034 · In reply to: #44033

jackywdx escribió:
> hi all:
> I have a problem, I wonder if there is any good way to check the url's validity.
> For example, the url: http://diybbs.enet.com.cn/thread-3004314-1-1.html 
> How can I check whether the page exsist, meaning it has content, not 404.
> My server's php version is PHP4.3.9, quite low, and doesn't  have curl extension.
> I have try fsockopen, fopen. But it's not effective enough, a bit slow.
> I wonder if there is some functions or some ways to quickly detemine whether the url is valid.
> Thanks.
> 

This question is suited for php-general list and NOT for internals,
anyway, install PHP5, and try again.. 4.3.9 is extremely old and you
shouldnt be running that...


-- 
"If this is the best God can do, I am not impressed" -George Carlin
(1937-2008)

Cristian Rodríguez R.
Software Developer
Platform/OpenSUSE - Core Services
SUSE LINUX Products GmbH
Research & Development
http://www.opensuse.org/
