XML_XRD
[ class tree: XML_XRD ] [ index: XML_XRD ] [ all elements ]

Source for file gen-lrdd.php

Documentation is available at gen-lrdd.php

  1. <?php
  2. /**
  3.  * Generate a LRDD file that contains information about a user.
  4.  *
  5.  * @author Christian Weiske <cweiske@php.net>
  6.  * @link   http://tools.ietf.org/html/draft-hammer-discovery-06
  7.  */
  8. require_once 'XML/XRD.php';
  9. $x = new XML_XRD();
  10. $x->subject = 'user@example.org';
  11.  
  12. //add link to the user's OpenID
  13. $x->links[= new XML_XRD_Element_Link(
  14.     'http://specs.openid.net/auth/2.0/provider',
  15.     'http://id.example.org/user'
  16. );
  17. //add link to user's home page
  18. $x->links[= new XML_XRD_Element_Link(
  19.     'http://xmlns.com/foaf/0.1/homepage',
  20.     'http://example.org/~user/'
  21. );
  22.  
  23. echo $x->toXML();
  24. ?>

Documentation generated on Mon, 11 Mar 2019 15:57:47 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.