Example #1
0
   Max Items to output (default 100): <input type="text" name="max" value="" /><br />
   Max characters of content to output: <input type="text" name="chars" value="" /><br />
   Timezone offset for timestamps (in the form +1 for UTC+1): <input type="text" name="tz" value="" /><br />
   <select name="format">
      <option value="xhtml">Output XHTML</option>
      <option value="rss20">Output RSS 2.0</option>
      <option value="js">Output JavaScript</option>
      <option value="json">Output JSON</option>
   </select><br />
   If JSON output, output raw object? <input type="checkbox" name="raw" /><br />
   Optional JSON callback function: <input type="text" name="callback" /><br />
   <input type="submit" value="Syndicate" />
</div></form>
   <?php 
} else {
    pollpage($_GET['url']);
    if ($_GET['post']) {
        $query = XN_Query::create('Content')->filter('owner', '=')->filter('type', 'eic', 'Comment')->filter('my.posturl', '=', $_GET['url'])->order('my.time', 'desc', XN_Attribute::NUMBER);
    } else {
        $query = XN_Query::create('Content')->filter('owner', '=')->filter('type', 'eic', 'Comment')->filter('my.posturl2', 'likeic', str_replace('-', '', str_replace('/', ' ', $_GET['url'])))->order('my.time', 'desc', XN_Attribute::NUMBER);
    }
    //end if-else ! post
    $items = $query->execute();
    $items = array_reverse(bytime_sort($items));
    if ($_GET['max']) {
        $items = array_slice($items, 0, $_GET['max']);
    }
    $_GET['chars'] = $_GET['chars'] ? $_GET['chars'] : 25;
    if ($_GET['format'] == 'rss20') {
        header("Content-Type: application/xml");
        ?>
Example #2
0
<?php

header('Content-Type: text/plain');
require_once 'XNC/Services/Google/Gmail.php';
require_once 'pollpage.php';
$gmail = new XNC_Services_Google_Gmail('GMAIL ADDRESS', 'PASSWORD');
foreach ($gmail as $message) {
    //$id = $message->id;
    //$from = $message->From;
    //$subject = $message->Subject;
    //$headers = $message->getHeader();
    $body = $message->getBody();
    echo $body;
    preg_match("/to <a href=\"(.*)\"/i", $body, $data);
    echo $data[1];
    pollpage($data[1]);
}
//end foreach