View Single Post
Old 04-10-2012, 05:18 AM  
just a punk
So fuckin' bored
 
just a punk's Avatar
 
Industry Role:
Join Date: Jun 2003
Posts: 32,381

1) CyberSEO can import galleries from FHG (TGP) RSS feeds (see example URL above).

2) If you want to import from a text dump, you can easily convert it into the RSS feed using this simple PHP script:

Code:
<?php
header ( 'Content-type: text/xml' );
if (isset ( $_GET ["dump"] )) {
    $dump = file ( $_GET ["dump"] );
    $time = time ();
    echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
    echo "<rss version=\"2.0\">\n";
    echo "<channel>\n";
    echo "<title>My Feed</title>\n";
    foreach ( $dump as $item ) {
        list ( $url, $desc, $title ) = explode ( "|", trim ( $item ) );
        $desc .= "<br /><a href=\"" . $url . "\">Click here for more...</a>";
        echo "       <item>\n";
        echo "               <title>" . $title . "</title>\n";
        echo "               <link>" . $url . "</link>\n";
        echo "               <guid>" . $url . "</guid>\n";
        echo "               <pubDate>" . date ( "D, d M  Y H:i:s O", $time ) . "</pubDate>\n";
        echo "               <description><![CDATA[" . $desc . "]]></description>\n";
        echo "       </item>\n";
        $time -= 86400;
    }
    echo "</channel>\n";
    echo "</rss>\n";
}
?>
Just upload it to your host (e.g. mysite.com) as dump2xml.php an use it as follows:

www.mysite.com/dump2xml.php?dump=<dump>

Where <dump> is an URL of your text dump in the format specified by DVTimes:

url|description|title

This will generate you an RSS feed which can be syndicated by the CyberSEO plugin.

What could be even easier?
__________________
Obey the Cowgod

Last edited by just a punk; 04-10-2012 at 05:27 AM..
just a punk is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote