1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Little PHP script to AutoMate the Blogger Blogs.

Discussion in 'Blogging' started by kijkij, Sep 20, 2009.

  1. kijkij

    kijkij Regular Member

    Joined:
    Apr 9, 2008
    Messages:
    254
    Likes Received:
    110
    Occupation:
    Teacher
    Location:
    Pandora
    Home Page:
    Hi BH fellows :cool:
    KASHIF JAVED is here, on the happiest day for the Muslims(EID-UL-FITR), here is my little contribution to BH community. First of all ?EID MUBARAK?.

    My this little script is for automate the blogger blogs. I got some codes from the net(available free) and compiled them into this system. You can download this at the end of this post.

    The Package includes 5 files and easy to implement. You need a host with php, mysql which support mail() function of php. Edit the files as?

    [config.php]

    Edit this to enter your mySQL information and save.

    [rssurl.txt]

    Edit this file as follows?

    1. First remember that ?1? is for Yes and ?0? is for No.(one and zero, I did not use True and false)
    2. The each line of this file will carry 6 arguments, each separated by ?|? a vertical bar.
    3. First argument is your rss url. It must be a valid XML file url from which you want to post the articles.
    4. Second is 1 or 0, 1 is to get full article and 0 to post just summary.
    5. Third is 1 or 0, 1 is to synonymies the article and 0 to post it as it is.
    6. Fourth is a number that how many posts you want to post. TIP:2 or 3 are enough.
    7. Fifth is Email ID to which you want to post. You can set it in your blogger account.
    8. Sixth is Email ID from you are going to post.

    NOTE: There must not be a blank space before or after the arguments.

    [synonyms.txt]

    Edit this file to add or delete word-synonyms.
    Put a blank space before and after word, synonyms.
    Separate word-synonyms with ?|? vertical bar.
    You can also use this to convert a word into a link. E.g. if you want that the word ?video? become a link then do as?.
    Video | <a href=?you link here?>video</a>
    You can also replace phrases with phrases.

    You Done.

    Upload the folder to your hosting excluding query.txt. Run this query to create mySql table. Run this after login into phpmyadmin.(Link is in your cPanel)

    You can rename the folder whatever you want.

    Set rss.php file as cron job, like?.

    {cron command} http://www.yourdomain.com/autoblogger/rss.php

    IMPORTANT NOTE:
    If you set rssurl.txt for ten blogs and each blog has 3 posts, it mean this script will send 30 emails at once, so may be your host take it as mass mail which is against their TOS.
    Set this into different directories and keep your rssurl.txt small for each. And for each directory set cron on different times.

    I don?t say that I have don a big job, but I did it myself to set my at least 100 blogger blogs on autopilot.

    Waiting for you comments.
     

    Attached Files:

    • Thanks Thanks x 16
    Last edited: Sep 21, 2009
  2. amsk98

    amsk98 Newbie

    Joined:
    Apr 20, 2009
    Messages:
    17
    Likes Received:
    0
    how can i use it on blogger.com
     
  3. tshin810

    tshin810 Junior Member

    Joined:
    Jun 16, 2009
    Messages:
    172
    Likes Received:
    673
    You can pull site content which is in xml format to blogger.com. You own site is working as a bridge.

    Content Site --> Your site (bridge) --> your blogger.com site

     
  4. kijkij

    kijkij Regular Member

    Joined:
    Apr 9, 2008
    Messages:
    254
    Likes Received:
    110
    Occupation:
    Teacher
    Location:
    Pandora
    Home Page:
    The script is for blogger.com, just follow the steps to set it up.
     
  5. xumarix

    xumarix Newbie

    Joined:
    Nov 23, 2008
    Messages:
    43
    Likes Received:
    3
    what you mean by Sixth is Email ID from you are going to post. Is it i cant just put my gmail or yahoo mail id
     
  6. arybegok

    arybegok Junior Member

    Joined:
    Dec 8, 2008
    Messages:
    110
    Likes Received:
    2
    which kind of rss this script can work?
     
  7. kijkij

    kijkij Regular Member

    Joined:
    Apr 9, 2008
    Messages:
    254
    Likes Received:
    110
    Occupation:
    Teacher
    Location:
    Pandora
    Home Page:
    yes, your any email ID.

    An rss which is in standard xml format.
     
    Last edited: Sep 22, 2009
  8. arybegok

    arybegok Junior Member

    Joined:
    Dec 8, 2008
    Messages:
    110
    Likes Received:
    2
    i've done it, i'll give any report for next 2 days, coz i've wait in 3 hours my blog still got no any new post
     
  9. kijkij

    kijkij Regular Member

    Joined:
    Apr 9, 2008
    Messages:
    254
    Likes Received:
    110
    Occupation:
    Teacher
    Location:
    Pandora
    Home Page:

    Test it by typing http://www.yourdomain.com/autoblogger/rss.php in your browser.
    Your blog must get the posts after this if you configured it correctly.
     
  10. arybegok

    arybegok Junior Member

    Joined:
    Dec 8, 2008
    Messages:
    110
    Likes Received:
    2
    Worked !!
     
    Last edited: Sep 22, 2009
  11. kijkij

    kijkij Regular Member

    Joined:
    Apr 9, 2008
    Messages:
    254
    Likes Received:
    110
    Occupation:
    Teacher
    Location:
    Pandora
    Home Page:
    Waiting for your comments for this script.
     
  12. arybegok

    arybegok Junior Member

    Joined:
    Dec 8, 2008
    Messages:
    110
    Likes Received:
    2
    the script work good in posting but it contains some symbolic.. like " So once or twice a week, more or less, Iâ&#8364;&#8482;Â'll post an update here about whatÂ's going on in one freelancerÂ's life" i really dunno how to remove it, any idea ?

    forget to mention that in rssurl.txt u must put the feed url like this : hxxp://www.your-feed-url/feed/
    otherwise i just got an error.
    sorry for my bad english :D
     
    Last edited: Sep 22, 2009
  13. cysh

    cysh Newbie

    Joined:
    Oct 9, 2007
    Messages:
    45
    Likes Received:
    21
    Those Iâ&#8364;&#8482;Â'll errors are apostrophes, not being read by the scripts it's actually a common problem with RSS feeders. Not exactly sure how to remove them other than manually.

    Maybe someone could create an array or something that strips them out?
     
  14. kijkij

    kijkij Regular Member

    Joined:
    Apr 9, 2008
    Messages:
    254
    Likes Received:
    110
    Occupation:
    Teacher
    Location:
    Pandora
    Home Page:

    Ok, I will modify the script to remove these special chars and upload it here again.

    And for feed it should be a valid standard xml url.
     
  15. arybegok

    arybegok Junior Member

    Joined:
    Dec 8, 2008
    Messages:
    110
    Likes Received:
    2


    i dont get it about valid standard xml. did u means it's like hxxp://www.your-feed-url.com/feed.xml ? or like hxxp://www.your-feed-url.com/feed/

    ah forget it, so far this script works for me better than feedmyinbox thank you so much kijkij, and i'm wait for the update u promised ;)
     
  16. bawejaan

    bawejaan Registered Member

    Joined:
    Aug 17, 2009
    Messages:
    80
    Likes Received:
    22
    @kijkij

    Thanks for such a great share that is why i loved bhw as it is full of beautiful people like you. The script really worked when i put the url in browser however it is giving me error when i set it with cron job. please explain me the exact command to give.
     
  17. bawejaan

    bawejaan Registered Member

    Joined:
    Aug 17, 2009
    Messages:
    80
    Likes Received:
    22
    @kijkij
    Thanks for such a great share that is why i loved bhw as it is full of beautiful people like you. The script really worked when i put the url in browser however it is giving me error when i set it with cron job. Please explain me the exact command to give.
     
  18. kijkij

    kijkij Regular Member

    Joined:
    Apr 9, 2008
    Messages:
    254
    Likes Received:
    110
    Occupation:
    Teacher
    Location:
    Pandora
    Home Page:
    I am working on it and soon it will be here.

    Yes like: hxxp://www.your-feed-url.com/feed.xml
    or put following in Mozilla Firefox for better understanding...
    http://www.actionforex.com/option,com_rd_rss/id,2/

    Note: In IE it will show only xml code but in firefox it shows in its format.


    Thanks to appreciate,Try this cron command:

    lynx -source http://www.yourdomain.com/autoblogger/rss.php

    This command is working fine for me.
     
  19. kijkij

    kijkij Regular Member

    Joined:
    Apr 9, 2008
    Messages:
    254
    Likes Received:
    110
    Occupation:
    Teacher
    Location:
    Pandora
    Home Page:
    Here is, get the new one.

    It is strongly recommended to use this than older as there are some fixes like....

    1. It will remove some unwanted chars(™,€,â,¦,Â).

    2. It will remove <img> because script cannot extract full url to img so its better to remove it.

    3. It will remove all links, as all the links go some where else, better to remove.Instead of it create your own with the help of synonyms.txt.

    4. It will not post article which less than 200 chars.

    A FIX for synonyms.txt-> Remove all the spaces before & after the words, synonyms otherwise it will not be synonymies.
     

    Attached Files:

    • Thanks Thanks x 1
  20. DocMello

    DocMello Newbie

    Joined:
    Feb 10, 2009
    Messages:
    21
    Likes Received:
    4
    Very interesting thread. I like seeing threads which develop as a joint effort to introduce and streamline a system. Community at its best.