Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function whisperfollow_mf2_read($page){
- $output = Mf2\parse(curldo($page),$page);
- foreach($output->items as $item){
- if($item->type == "h-feed"){
- foreach($item->children as $child){
- if(in_array("h-entry",$child->type)){
- try{
- whisperfollow_log("<br/>got ".$child->properties->name[0]." from ". $item->properties->name[0]."<br/>");
- add_whisper($child->properties->url[0],$child->properties->name[0],$child->properties->content[0]->html,$item->properties->name[0],$page,strtotime($item->properties->published[0])->format( 'U' ));
- }catch(Exception $e){
- whisperfollow_log("Exception occured: ".$e->getMessage());
- }
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement