Skip to content

Instantly share code, notes, and snippets.

@jonnybarnes
Created February 20, 2014 12:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jonnybarnes/9112515 to your computer and use it in GitHub Desktop.
Save jonnybarnes/9112515 to your computer and use it in GitHub Desktop.
<?php
echo "Content: $content\n";
echo "baseURL: $baseurl\n";
$mf = \Mf2\parse($content, $baseurl);
print_r($mf);
?>
Content: <!DOCTYPE html>
<html>
<head>
<title>A reply to Jonny Barnes</title>
</head>
<body>
<div class="container-fluid container-narrow h-entry">
<div class="row-fluid">
<div class="span8 note">
<div class="span12 note-context external-note">
<ul class="single">
<li class="p-in-reply-to h-cite">
<div class="inner">
<div class="minicard h-card vcard author p-author">
<div>
<img class="photo logo u-photo" src="https://jb.dev/assets/img/jmb-bw.png" alt="Jonny Barnes"/>
</div>
<a href="https://jb.dev/" class="u-url">https://jb.dev/</a>
<a class="p-name fn value" href="https://jb.dev/">Jonny Barnes</a>
</div>
<div class="quote-text">
<div class="e-content p-name">
Testing webmentions
</div>
</div>
<a href="https://jb.dev/note/49" class="u-url">
<time class="date dt-published" datetime="2014-02-19T22:03:29+0000">February 19, 2014 10:03pm</time>
</a>
</div>
</li>
</ul>
</div>
<div class="content reply has-footer">
<!--<div class="minicard h-card vcard author p-author">
<img class="photo logo u-photo" src="http://aaronparecki.com/images/aaronpk.png" alt="Aaron Parecki" />
<a href="http://aaronparecki.com/" rel="author" class="u-url url">aaronparecki.com</a>
<a class="p-name fn value" href="http://aaronparecki.com/">Aaron Parecki</a>
<a href="https://plus.google.com/117847912875913905493" rel="author" class="google-profile">Aaron Parecki</a>
</div>-->
<div class="note-text entry-content e-content p-name">
<a href="https://jb.dev">Jonny Barnes</a>: Congrats!
</div> <!-- e-content -->
<div class="meta">
<ul>
<li>
<a href="https://jb.dev/notes-id.html" class="u-url">
<time class="date dt-published" datetime="2014-02-19T22:14:25+0000">February 19, 2014 10:14pm</time>
</a>
</li>
</ul>
</div>
</div>
</div>
</div>
</div>
</body>
</html>
baseURL: http://localhost
Array
(
[items] => Array
(
)
[rels] => stdClass Object
(
)
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment