2009/12/18 Dan Field <d...@llgc.org.uk>:
> Is it possible to use PHP to answer HEAD http requests? Is it as simple as
> doing something like:
> header('blah')
> exit;
> I'd expect PHP to produce a full page rather than just a header though.
> --
> Dan Field <d...@llgc.org.uk>                   Ffôn/Tel. +44 1970 632 582
> Peiriannydd Meddalwedd                          Senior Software Engineer
> Llyfrgell Genedlaethol Cymru                   National Library of Wales

$_SERVER['REQUEST_METHOD'] will/should contain the request type.
Documented as ...

"Which request method was used to access the page; i.e. 'GET', 'HEAD',
'POST', 'PUT'.
Note: PHP script is terminated after sending headers (it means after
producing any output without output buffering) if the request method
was HEAD."

See http://docs.php.net/manual/en/reserved.variables.server.php

Richard Quadling
"Standing on the shoulders of some very clever giants!"
EE : http://www.experts-exchange.com/M_248814.html
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
ZOPA : http://uk.zopa.com/member/RQuadling

PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to