summaryrefslogtreecommitdiffstats
path: root/examples/detect.php
diff options
context:
space:
mode:
authortailor <cygnus@cprogrammer.org>2007-03-12 18:30:34 +0000
committertailor <cygnus@cprogrammer.org>2007-03-12 18:30:34 +0000
commit74b0846ec63525092e679eec1f63bea74e139be2 (patch)
tree396aa24f5b3178fcfa175ef02569bb4ba719e9fa /examples/detect.php
parent472974f916b6187f9f550771cb79c5e3187689ab (diff)
downloadphp-openid-74b0846ec63525092e679eec1f63bea74e139be2.zip
php-openid-74b0846ec63525092e679eec1f63bea74e139be2.tar.gz
php-openid-74b0846ec63525092e679eec1f63bea74e139be2.tar.bz2
[project @ Include yadis code and complain if it isn't found]
Diffstat (limited to 'examples/detect.php')
-rw-r--r--examples/detect.php8
1 files changed, 8 insertions, 0 deletions
diff --git a/examples/detect.php b/examples/detect.php
index 28d8a28..c368d0d 100644
--- a/examples/detect.php
+++ b/examples/detect.php
@@ -386,6 +386,14 @@ function detect_xml($r, &$out)
function detect_fetcher($r, &$out)
{
$out .= $r->h2('HTTP Fetching');
+
+ $result = @include 'Services/Yadis/Yadis.php';
+
+ if (!$result) {
+ $out .= $r->p('Yadis code unavailable; could not test fetcher support.');
+ return false;
+ }
+
if (Services_Yadis_Yadis::curlPresent()) {
// XXX: actually fetch a URL.
$out .= $r->p('This PHP installation has support for libcurl. Good.');