$links[] = str_replace('http://forum.xda-developers.com//', 'http://forum.xda-developers.com/', 'http://forum.xda-developers.com/' . $pageLink->nodeValue); } return $links; } $threadID = $_REQUEST['t']; #$threadID='3033808'; if (!is_numeric($threadID)) { echo "Thread ID must be a number\n"; exit(1); } $rssFeed = new RSSFeed('XDA Thread RSS', 'http://forum.xda-developers.com/showthread.php?t=' . $threadID, 'XDA Thread RSS'); $rssFeed->setLastBuildDate(new DateTime()); # Get the last page and work out the last 2 pages' URLs $html = getPageHTML(getRealThreadURL($threadID)); # 000 Webhost doesn't allow CURLOPT_FOLLOWLOCATION so I need to do this... $links = getLastNPageURLs($html, 2); #require_once('html.php'); #### DEBUG #### #$links=array(0); #### DEBUG #### # Add the second, and first last page to the RSS feed for ($i = 0; $i < sizeof($links); $i++) { addPageToRSSFeed(getPageHTML($links[$i]), $rssFeed); } # Add the very last page to the RSS feed addPageToRSSFeed($html, $rssFeed); # Reverse the RSS Items so the latest one appears up top $rssFeed->reverseRSSItems(); # Display the content ob_start(); header('Content-Type: text/xml;charset=UTF-8'); echo $rssFeed->getXMLSource(); ob_end_flush();
mainFunc(); Surface.loop(loopFunc, 60); } main(canvas, width, height, automataInit, automataLoop); EOD; $output .= '</script>'; return $output; } function getPageHTML($canvas, $width, $height) { $output = ''; $output .= '<!DOCTYPE html>'; $output .= '<html>'; $output .= '<head>'; $output .= '</head>'; $output .= '<body>'; $output .= '<canvas id="' . $canvas . '" width="' . $width . '" height="' . $height . '">'; $output .= 'herp derp nice browser'; $output .= '</canvas>'; $output .= getPageJS($canvas, $width, $height); $output .= '</body>'; $output .= '</html>'; return $output; } $output = ''; $output .= getPageHTML('canvas', 320, 200); echo $output;
$outputJS = rtrim($outputJS, ', '); $outputJS .= ');'; } foreach ($canvasFunctionsDefine as $canvasFunction => $variables) { $outputJS .= 'function ' . $canvasFunction . '('; foreach (explode(', ', $variables) as $variable) { $outputJS .= strstr($variable, ' ', true) . ', '; } $outputJS = rtrim($outputJS, ', '); $outputJS .= '){'; $outputJS .= $canvasFunction($variables); $outputJS .= '}'; } $outputJS .= '}'; if (!DEVEL) { getPackedJS($outputJS); } return $outputJS; } if ('DEFAULT' == 'DEFAULT') { $output = ''; $output .= getPageHTML(); echo $output; } function getPackedJS(&$strJS) { require_once 'class.JavaScriptPacker.php'; $myPacker = new JavaScriptPacker($strJS, 'High ASCII', true, false); $strJS = $myPacker->pack(); $strJS = rtrim($strJS); }
Surface.init(canvasContext, width, height); Surface.loop(loopFunc, 60); } main(canvas, width, height, circleLoop, circleLoop); EOD; $output .= '</script>'; return $output; } function getPageHTML($canvas, $width, $height) { $output = ''; $output .= '<!DOCTYPE html>'; $output .= '<html>'; $output .= '<head>'; $output .= '</head>'; $output .= '<body>'; $output .= '<canvas id="' . $canvas . '" width="' . $width . '" height="' . $height . '">'; $output .= 'herp derp nice browser'; $output .= '</canvas>'; $output .= getPageJS($canvas, $width, $height); $output .= '</body>'; $output .= '</html>'; return $output; } $output = ''; $output .= getPageHTML('canvas', 1024, 768); echo $output;
function getPageHTMLVersion($params) { return getPageHTML($params); }
mainFunc(); Surface.loop(loopFunc, 60); } main(canvas, width, height, drawMandel, drawMandel); EOD; $output .= '</script>'; return $output; } function getPageHTML($canvas, $width, $height) { $output = ''; $output .= '<!DOCTYPE html>'; $output .= '<html>'; $output .= '<head>'; $output .= '</head>'; $output .= '<body>'; $output .= '<canvas id="' . $canvas . '" width="' . $width . '" height="' . $height . '">'; $output .= 'herp derp nice browser'; $output .= '</canvas>'; $output .= getPageJS($canvas, $width, $height); $output .= '</body>'; $output .= '</html>'; return $output; } $output = ''; $output .= getPageHTML('canvas', 500, 500); echo $output;
mainFunc(); Surface.loop(loopFunc, 60); } main(canvas, width, height, automataInit, automataLoop); EOD; $output .= '</script>'; return $output; } function getPageHTML($canvas, $width, $height) { $output = ''; $output .= '<!DOCTYPE html>'; $output .= '<html>'; $output .= '<head>'; $output .= '</head>'; $output .= '<body>'; $output .= '<canvas id="' . $canvas . '" width="' . $width . '" height="' . $height . '">'; $output .= 'herp derp nice browser'; $output .= '</canvas>'; $output .= getPageJS($canvas, $width, $height); $output .= '</body>'; $output .= '</html>'; return $output; } $output = ''; $output .= getPageHTML('canvas', 64, 64); echo $output;
} main(canvas, width, height, automataInit, automataLoop); EOD; $output .= '</script>'; return $output; } function getPageHTML($canvas, $width, $height) { $output = ''; $output .= '<!DOCTYPE html>'; $output .= '<html>'; $output .= '<head>'; $output .= '</head>'; $output .= '<body>'; $output .= '<canvas id="' . $canvas . '" width="' . $width . '" height="' . $height . '">'; $output .= 'herp derp nice browser'; $output .= '</canvas>'; $output .= '<br><input id="derp" name="derp" type="button" onClick="clearCells();">Clear</input>'; $output .= '<input id="herp" name="herp" type="button" onClick="initialCells();">Spawn</input>'; $output .= '<input id="herp" name="herp" type="button" onClick="running=!running;">Start/Stop</input>'; $output .= '<input id="nerp" name="nerp" type="button" onClick="setRandomRules();">RandomRules</input>'; $output .= getPageJS($canvas, $width, $height); $output .= '</body>'; $output .= '</html>'; return $output; } $output = ''; $output .= getPageHTML('canvas', 257, 257); echo $output;
{ var canvasContext = document.getElementById(canvas); var p = new Processing(canvasContext, loopFunc); } main(canvas, width, height, automataLoop); EOD; $output .= '</script>'; return $output; } function getPageHTML($canvas, $width, $height) { $output = ''; $output .= '<!DOCTYPE html>'; $output .= '<html>'; $output .= '<head>'; $output .= '<script src="processing-1.3.6.min.js"></script>'; $output .= '</head>'; $output .= '<body>'; $output .= '<canvas id="' . $canvas . '" width="' . $width . '" height="' . $height . '">'; $output .= 'herp derp nice browser'; $output .= '</canvas>'; $output .= getPageJS($canvas, $width, $height); $output .= '</body>'; $output .= '</html>'; return $output; } $output = ''; $output .= getPageHTML('canvas', 129, 129); echo $output;