# Suggestion: If URL Loads Initially, then stop

- Thread: https://externals.io/message/15954
- Original archive: https://news-web.php.net/php.internals/15954
- Started by Ryan Hemelaar on 2005-04-13T12:54:53+00:00
- Messages: 3
- 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

---

## #15954 — Ryan Hemelaar — 2005-04-13T12:54:53+00:00

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

Hi there,

I don't know if this is the place to do it, but anyway. I have a suggestion 
for a new function that PHP could have:

It will be similar to fopen, but instead of actually loading the URL, it 
starts loading the page, then once PHP knows that it's started loading, it 
will stop it before it's finished; then it would set the variable in the 
function's brackets as true. eg: Functname($URL;$trueorfalse).

This could be used to check if a site is up without having to download the 
whole page.

Regards,


Ryan

---

## #15955 — dz@bitxtender.com — 2005-04-13T13:16:06+00:00

URL: https://externals.io/message/15954#15955 · In reply to: #15954

http://www.php.net/manual/en/function.get-headers.php

- David


> -----Original Message-----
> From: Ryan Hemelaar [mailto:ryan@royalfoods.com.au]
> Sent: Wednesday, April 13, 2005 2:55 PM
> To: internals@lists.php.net
> Subject: [PHP-DEV] Suggestion: If URL Loads Initially, then stop
> 
> Hi there,
> 
> I don't know if this is the place to do it, but anyway. I have a
> suggestion
> for a new function that PHP could have:
> 
> It will be similar to fopen, but instead of actually loading the URL, it
> starts loading the page, then once PHP knows that it's started loading, it
> will stop it before it's finished; then it would set the variable in the
> function's brackets as true. eg: Functname($URL;$trueorfalse).
> 
> This could be used to check if a site is up without having to download the
> whole page.
> 
> Regards,
> 
> 
> Ryan

---

## #15958 — Xuefer — 2005-04-14T02:36:24+00:00

URL: https://externals.io/message/15954#15958 · In reply to: #15954

use HEAD request


> Hi there,
> 
> I don't know if this is the place to do it, but anyway. I have a suggestion
> for a new function that PHP could have:
> 
> It will be similar to fopen, but instead of actually loading the URL, it
> starts loading the page, then once PHP knows that it's started loading, it
> will stop it before it's finished; then it would set the variable in the
> function's brackets as true. eg: Functname($URL;$trueorfalse).
> 
> This could be used to check if a site is up without having to download the
> whole page.
> 
> Regards,
> 
> Ryan
