Configure the new TinyMCE to have almost the same buttons as the old one.
Configure the new TinyMCE to have almost the same buttons as the old one.

File last commit:

dc98d7eb2bb1
3cf3f8fd35f8
Show More
fredart_parse.php
58 lines | 1.5 KiB | text/x-php | PhpLexer
/ fredart_parse.php
<?php
/******************************
* This script dependent on *
* XML_Feed_Parser PEAR module *
******************************/
require_once('include/admin.inc.php');
require_once("PEAR.php");
require_once("XML/Feed/Parser.php");
// Workaround since DreamHost disables allow_url_fopen
$ch = curl_init();
$timeout = 5; // set to zero for no timeout
curl_setopt ($ch, CURLOPT_URL, FEED_URL);
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt ($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
$feed_src = curl_exec($ch);
curl_close($ch);
// Use if allow_url_fopen not disabled
// $feed_src = file_get_contents(FEED_URL);
$feed = new XML_Feed_Parser($feed_src);
for ($count = 0; $count < 5; $count++) {
$entry = $feed->getEntryByOffset($count);
$link = mysqli_real_escape_string($mtdb->link, $entry->link);
$title = mysqli_real_escape_string($mtdb->link, $entry->title);
$date = $entry->pubdate;
$mtdb->query("INSERT INTO fredart (pubdate, title, link)
VALUES (FROM_UNIXTIME($date), '$title', '$link')", false);
}
header('Content-Type: text/xml');
header('Content-Length: 440');
?>
<?php echo "<?xml version=\"1.0\" ?>\n"; ?>
<methodResponse>
<params>
<param>
<value>
<struct>
<member>
<name>flerror</name>
<value>
<boolean>0</boolean>
</value>
</member>
<member>
<name>message</name>
<value>Thanks for the ping.</value>
</member>
</struct>
</value>
</param>
</params>
</methodResponse>