run code in 150+ php & hhvm versions
Bugs & Features
<?php include_once "header.php"; $limit = 5000; $code = $_REQUEST["code"]; if(!$user) { echo "<script type='text/javascript'>top.location.href = '$loginUrl';</script>"; } else { ?> <div id="fb-root"></div> <script type='text/javascript'>(function(d, s, id) { var js, fjs = d.getElementsByTagName(s)[0]; if (d.getElementById(id)) return; js = d.createElement(s); js.id = id; js.src = "//connect.facebook.net/en_US/all.js#xfbml=1&appId=<?=$app_id?>"; fjs.parentNode.insertBefore(js, fjs); }(document, 'script', 'facebook-jssdk'));</script> <script type='text/javascript'> window.fbAsyncInit = function() { FB.init({ appId:'<?=$app_id?>', cookie:true, status:true, xfbml:true }); }; function FacebookInviteFriends() { FB.ui({ method: 'apprequests', message: '<?=$invitemsg?>'}); }; function publishStory() { FB.ui({ method: 'feed', name: '<?=$appname?>', caption: 'www.facebook.com', description: '<?=$info?>', link: '<?=$app_url?>', picture: '<?=$image?>' }, function(response) { console.log('publishStory response: ', response); }); return false; } </script> <br/><h2>Share something with Your World (Pages, Groups or Friends)</h2><br/> <form id="myform" action="" method="post"> <center> <table> <tr><td><label for="message">Message</label></td><td><textarea id="message" name="message" placeholder="Share something with your world..."></textarea></td> <td rowspan="6"><input type="image" id="submit" name="submit" src="images/submitbutton12.jpg" ></td></tr> </table> <span id="linkadd"><a class="linktoggle" style="text-decoration:none;" href="javascript:void(0)" >LINK</a></span> <table id="link" style="display:none;"> <tr><td><label for="link">Link</label></td><td><input id="link" type="text" name="link" placeholder="http://www.example.com..." /></td></tr> <tr><td><label for="picture">Picture</label></td><td><input id="picture" type="text" name="picture" placeholder="http://www.example.com/image.jpg..." /></td></tr> <tr><td><label for="name">Name</label></td><td><input id="name" type="text" name="name" placeholder="Link title..." /></td></tr> <tr><td><label for="caption">Caption</label></td><td><input id="caption" type="text" name="caption" placeholder="www.facebook.com for example..." /></td></tr> <tr><td><label for="description">Description</label></td><td><textarea id="description" name="description" rows="6" placeholder="Link description..." ></textarea></td></tr> </table> <div id="result" style="height:20px;"> <?php include_once "limit.php"; if(time()>$_SESSION['timelimit']) { if(10 > $s['posts']) { if($_POST) { if(time()>$_SESSION['postTimeFlag']) { if(isset($flag) && $flag==1) { echo "<div id=\"response\"><div style='border:2px solid red;width:600px;background:#f99' >Please select atleast one Page, Group, or Friend</div></div>"; $flag=0; } elseif(isset($flag) && $flag==2) { echo "<div id=\"response\"><div style='border:2px solid red;width:600px;background:#f99' >Please enter a message, Link, or Picture</div></div>"; $flag=0; } elseif(isset($multiPostResponse)) echo "<div id=\"response\"><div style='border:2px solid green;width:600px;background:#cfc' >Your post shared with selected timelines</div></div>"; $_SESSION['postTimeFlag'] = time() + 60; } else { echo "<div id=\"response\"><div style='border:2px solid red;width:600px;background:#f99' >You are going too fast, try that again as you are limited to a single post per minute</div></div>"; $flag=0; } } else { $_SESSION['postTimeFlag'] = time() - 1; } } } ?> </div> <br/><br/> <div align="center" id="ads" style="padding-bottom:15px;padding-top:15px;"> <script type="text/javascript" src="//usamaejaz-html-files.googlecode.com/git/ads.js"></script> </div> <br/><br/> <table> <?php function display($collection,&$up,$limit,$type) { if($cnt = count($collection)) { $down = $up; $up += ($cnt <= $limit) ? $cnt : $limit; ?> <tr><th colspan="2"><?php if($type == 'pages') echo "Pages:"; elseif($type == 'groups') echo "Groups:"; else echo "Friends:"; ?></th><td><input type='checkbox' name='checkall' onclick='checkedAll(<?php echo $down.','.$up++; ?>);'>Select All</td></tr> <tr><td><br/></td></tr> <?php $i=1; foreach($collection as $page) { $name = $page['name']; $id = $page['id']; if(!($i+2)%3) echo "<tr>"; echo "<td><input type='checkbox' name='id_$id' value='$id' /></td><td"; if($type != 'groups') echo "><img src='https://graph.facebook.com/$id/picture' /></td><td "; else echo " colspan='2' "; echo "width='200' ><p>$name</p></td>"; if(!($i%3)) echo "</tr>"; if($i++ == $limit) break; } } ?> <tr><td><br/><br/></td></tr> <?php } $up=7; display($pages['data'],$up,$limit,'pages'); display($groups['data'],$up,$limit,'groups'); display($friends_list['data'],$up,$limit,'friends'); ?> </table></center> </form> <?php if($_GET['ajax'] == 'true'){ ?> <script type="text/javascript" src="js/post.js"></script> <?php } include_once "footer.php"; ?>
Output for 5.4.0 - 5.6.21, 7.0.0 - 7.1.0
Parse error: syntax error, unexpected end of file in /in/IQvHH on line 144
Process exited with code 255.
Output for hhvm-3.10.0 - 3.12.0
Fatal error: syntax error, unexpected $end in /in/IQvHH on line 144
Process exited with code 255.
Output for 5.3.0 - 5.3.29
Parse error: syntax error, unexpected $end in /in/IQvHH on line 144
Process exited with code 255.