PHP code example of grantholle / pear-services-yadis

1. Go to this page and download the library: Download grantholle/pear-services-yadis library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

grantholle / pear-services-yadis example snippets


use Pear\Services\Yadis\Yadis;

$openid = 'http://padraic.astrumfutura.com';
$yadis = new Yadis($openid);
$yadis->addNamespace('openid', 'http://openid.net/xmlns/1.0');
$serviceList = $yadis->discover();

foreach ($serviceList as $service) {
    $types = $service->getTypes();
    echo $types[0], ' at ', implode(', ', $service->getUris()), PHP_EOL;
    echo 'Priority is ', $service->getPriority(), PHP_EOL;
}