Pixelated a phpBB Template by SkaidonDesigns
 
Cheapest Web Software Support Area Forum Index www.cheapestwebsoftware.com
Play with the Best, be the Best!
Special Offer
FAQ
Search
Memberlist
Usergroups
Profile
Log in to check your private messages
Log in

The Mightiest Webmaster Solutions Ever
Cheapest Web Software
Cheapest Web Software
Rocket Pinger
Rocket Pinger
Blogs Automater
Blogs Automater
Cheapest Adult Scripts
Cheapest Adult Scripts

Haven't registered yet? Do it here now!
Automatically empty a feed
Topic Tags:
 
Post new topic   Reply to topic    Cheapest Web Software Support Area Forum Index -> Blogs Automater
View previous topic :: View next topic  
Author Message
unc0nnected



Joined: 17 Dec 2010
Posts: 27

PostPosted: Sat Jan 08, 2011 9:38 am    Post subject: Automatically empty a feed Reply with quote
What I want to do is take an RSS feed that only contains 1 item and repost that one item to another blog every day. The 1 item in the feed itself has it's date stamp updated everyday and contains php that is interrupted by the target blog and converted into data that is updated on the fly to fit the day.

The problem I have here is that once this one item has been posted BA won't post it agian unless I empty the feed and then recrawl it. So what is the best way to automatically empty a specific feed at the end of the day? Definitely appreciate any help you guys can give
Back to top
View user's profile Send private message

Author Message
Atanasis
Owner


Joined: 22 May 2004
Posts: 4284
Location: The Net

PostPosted: Sat Jan 08, 2011 6:52 pm    Post subject: Reply with quote
BA won't pick the entry again if it contains same title. If you have your software change the post title you will be fine.

There is no automatically empty feed function, sorry..
_________________
Thanks,
Kaktusan

Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger ICQ Number

Author Message
unc0nnected



Joined: 17 Dec 2010
Posts: 27

PostPosted: Sat Jan 08, 2011 10:55 pm    Post subject: Reply with quote
Well I realized there was no simple way to automate that, I was hoping to setup a cron with wget or something along those lines to jerry rig this thing. I can get wordpress to exec php in the post body and in the excerpt so that it is dynamic on every repost but I still haven't figured out how to have the title do the same. Back to the drawing board. Unless there was a way to allow BA to post content with duplicate titles up
Back to top
View user's profile Send private message

Author Message
unc0nnected



Joined: 17 Dec 2010
Posts: 27

PostPosted: Wed Jan 12, 2011 12:28 pm    Post subject: Reply with quote
Hmm, I think it's just a matter of clearing the correct data from the baentries table. Not sure how exactly, but that's what google is for.

And here are the results.. All I needed to do was write simple php script that cleared the entries for a specific feed and run that on a cron that coincides with how often I want to crawl the feed. I'm sure for someone that knows php this would have taken 2 minutes instead of the hours that I spent on it but here it is:

<?php

//Get the Feed ID Variable
$feedID = $_GET['feedID'];

// Connect to MySQL
mysql_connect("localhost","%db_user%","%db_password%")or die(mysql_error())
;
mysql_select_db("%database%")or die(mysql_error());
echo "Database Connection Established <BR>";

// Delete the entries of a specific feed
mysql_query("DELETE FROM baentries WHERE fid='$feedID'")
or die(mysql_error());
echo "Entries Cleared for Feed ID $feedID <BR>";

mysql_query("DELETE FROM bamdsums WHERE fid='$feedID'")
or die(mysql_error());
echo "Sums Cleared for Feed ID $feedID <BR><BR> and that makes us all done";

?>

It's setup so that you can specify the feed id in the url by passing on the variable like this:

domain.com/clearfeed.php?feedID=5 or whatever # your feed ID is

Obviously you're going to substitute the values in between the %'s with proper values from your setup

Looks to be working just fine for me so I hope this saves someone else the time that I went through to get it working
Back to top
View user's profile Send private message

Author Message
unc0nnected



Joined: 17 Dec 2010
Posts: 27

PostPosted: Tue Jan 17, 2012 8:43 am    Post subject: Reply with quote
Ah, thank goodness for this.. I just moved servers and realized that I left about 50 cronjobs behind and was stumped trying to figure out how to get BA to automatically clear out 100's of feed's, reset dozens of campaigns and then recrawl them on a set schedule. Looks like I updated the php script to include campaigns as well which I'll include the code for below:


<?php

//Get the Feed ID Variable
$feedID = $_GET['feedID'];
$caID = $_GET['caID'];


// Connect to MySQL
mysql_connect("localhost","#USERNAME#","#PASSWORD#")or die(mysql_error());
mysql_select_db("#DATABASE#")or die(mysql_error());
echo "Database Connection Established <BR>";

// Delete the entries of a specific feed
mysql_query("DELETE FROM baentries WHERE fid='$feedID'")
or die(mysql_error());
echo "Entries Cleared for Feed ID $feedID <BR>";

mysql_query("DELETE FROM bacentries WHERE cid='$caID'")
or die(mysql_error());
echo "Campaign Entry Cleared for Cat ID $caID <BR>";

mysql_query("DELETE FROM bamdsums WHERE fid='$feedID'")
or die(mysql_error());
echo "Sums Cleared for Feed ID $feedID <BR><BR> and that makes us all done";


?>
Back to top
View user's profile Send private message

Display posts from previous:   
Post new topic   Reply to topic    Cheapest Web Software Support Area Forum Index -> Blogs Automater All times are GMT + 2 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2002 phpBB Group