Simple User Registration

From n² wiki

Jump to: navigation, search

RDF/XML will come in through a HTML form post (it's generated with js in the browser).

I want to pull out the email address from the RDF (rather treat it as RDF than using regexps, there'll be quite a few other places where I'll need the same kind of setup).

here's an example of what $_POST['data'] might contain:

<rdf:RDF
      xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
      xmlns:acc="http://purl.org/stuff/accounts#"
      xmlns="http://xmlns.com/foaf/0.1/">
 <Person rdf:nodeID="person">
    <nick>danja</nick>
    <acc:password>pass</acc:password>
    <mbox>mailto:danny.ayers@gmail.com</mbox>
    <mbox_sha1sum>669fe353dbef63d12ba11f69ace8acbec1ac8b17</mbox_sha1sum>
    <homepage rdf:resource="http://dannyayers.com" />
 </Person>
 <PersonalProfileDocument rdf:about="http://dannyayers.com/misc/foaf.rdf">
    <maker rdf:nodeID="person"/>
    <primaryTopic rdf:nodeID="person"/>
 </PersonalProfileDocument>
</rdf:RDF>
Personal tools