Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact us. |
|
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed. |
|
Thread Tools |
05-23-2012, 09:40 AM | #1 |
So fuckin' bored
Industry Role:
Join Date: Jun 2003
Posts: 32,378
|
[HOW_TO] Generating gallery RSS feeds from text dumps
As you maybe already know not all the affiliate allows to generate gallery RSS feeds which can be used by TGP scripts or autoblogging plugins like CyberSEO.
Let me show you an easy way on how to generate the gallery RSS feeds of the usual text dumps. So, here we go. 1) Save the following code as xml.php and upload it to your host (e.g. yoursite.com/xml.php) Code:
<?php 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 ( $title, $desc, $url ) = explode ( "|", trim ( $item ) ); 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"; } ?> {title}|{description}|{url} Make sure all your galleries have titles and descriptions, then save the dump as a text file and also upload it to your host (e.g.: yoursite.com/site1_dump.txt). 3) Now open this link in your browser: yoursite.com/xml.php?dump=site1_dump.txt The STANDARD TGP RSS feed will be generated. You can import it to your blog using standard code without any magic tricks from my side. The mentioned above simple 3-step manual will work with any sponsor which allow to generate text dumps, thus it's absolutely universal.
__________________
Obey the Cowgod |
05-23-2012, 09:58 AM | #2 |
Confirmed User
Industry Role:
Join Date: Oct 2006
Posts: 362
|
Simply beautiful. I had not thought of this. Thank you for sharing.
|
05-23-2012, 10:10 AM | #3 |
Holedex.com
Industry Role:
Join Date: Jun 2003
Location: UK
Posts: 31,542
|
bump for this great tip.
__________________
My old and new pics I have shot |
05-23-2012, 08:31 PM | #4 |
Confirmed User
Industry Role:
Join Date: Aug 2002
Location: USA
Posts: 460
|
Wow awesome ! Any way to add a thumbnail or image?
|
05-23-2012, 09:37 PM | #5 |
frc
Industry Role:
Join Date: Jul 2003
Location: Bitcoin wallet
Posts: 4,663
|
Thanks for the tip. I've got a little RSS work to do on one of my websites.
|
05-23-2012, 09:48 PM | #6 |
Confirmed User
Industry Role:
Join Date: Sep 2007
Location: North Carolina
Posts: 538
|
Bump for free code ;)
__________________
Skype rhcp011235 | Cell Phone 212.812.9043 | Email [email protected]
|
05-24-2012, 02:06 AM | #7 |
So fuckin' bored
Industry Role:
Join Date: Jun 2003
Posts: 32,378
|
Sure thing. Here is the code:
Code:
<?php 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 ( $title, $desc, $thumb, $url ) = explode ( "|", trim ( $item ) ); 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 " <enclosure url=\"" . $thumb . "length=\"5\" type=\"image/jpeg\" />\n"; echo " </item>\n"; $time -= 86400; } echo "</channel>\n"; echo "</rss>\n"; } ?> {title}|{description}|{thumb}|{url} BTW, if there are affiliate programs owners who want supply their affiliates with VALID XML and RSS feeds of their picture/video galleries and FLV/MP4 files (in TubeAce and SmartScripts formats for tubes) - don't hesitate to contact me. P.S. I can even make these feeds morphing (titles, descriptions and images).
__________________
Obey the Cowgod |
05-24-2012, 06:13 AM | #8 |
Confirmed User
Industry Role:
Join Date: Aug 2002
Location: USA
Posts: 460
|
Thank you !
|
06-07-2012, 04:30 PM | #9 |
Confirmed User
Industry Role:
Join Date: Jul 2008
Location: In your back seat with duck tape
Posts: 4,568
|
what about adding flv or mp4?
__________________
High Performance Vps $10 Linode Manage your Digital Ocean, Linode, or Favorite Cloud Server. Simple, fast, and secure Server Pilot |
06-07-2012, 05:19 PM | #10 |
So fuckin' bored
Industry Role:
Join Date: Jun 2003
Posts: 32,378
|
That will be a bit more complicated code to meet the SmartScripts standards including parameters etc. I can do it as a custom job however. Don't hesitate to email me if you are interested.
__________________
Obey the Cowgod |