Mini Bots PHP Class

LAST UPDATE 10/09/2012

NOTE: Some of these methods no longer works, they need to be changed to follow the changes of the services called, I’ve marked the ones that no longer work with *KO.

This php class is a growing collection of small spiders that go out on the web and make some small usefull works. I’ve decided to raise it to the top level menu beacuse I think it’s a nice project, and I will explain the functions in the blog.

Since this class could violate the rules of other sites, please, use this class properly, be correct: I mean, bots can cause problems to server, and can be used to steal contents, so use those scripts with attention (that is to say “not too much”). This class was build for educational purpose, so check the rules of the called services to decide if you can use those scripts in your commercial products, I don’t know.

Actually the mini bots can do those things:

Version 1.9h includes:

  1. check if a remote mp3 exists and is an mp3
  2. search Myspace Concerts (DEMO)
  3. search Google and get the spelling suggest (DEMO) *KO
  4. search Google and retrieve the meteo information for a place
  5. search Bank Of Italy service to get exchange rates for a specified currency
  6. search GeoIpTool to retrieve geographical information from a specified IP address (DEMO)
  7. contact any mail server to validate email address through smtp protocol (DEMO)
  8. call tinyurl.com to get a tiny url of a specified long url (DEMO)
  9. decode any small url to the original long url (DEMO)
  10. url checker to see if a url exists
  11. get url infos to get data about a page (title, description, favicon, images) (DEMO)
  12. retrieves all the text from a url
  13. convert a url to a pdf and save it to a local file
  14. get twitter users info from web page and from Twitter’s API
  15. set twitter status
  16. get twitter statuses update list
  17. get video list uploaded by a user in Youtube (DEMO)
  18. get first page of url images from Google Images (DEMO) *KO
  19. change facebook status
  20. post to facebook fan page wall
  21. parsing rss flickr feed of a user (DEMO)
  22. sending push alerts to iPhone (DEMO)
  23. google suggest keywords service (DEMO)
  24. find definitions on Wikipedia (DEMO)
  25. convert a street address to latitude/longitude coordinates (DEMO)
  26. retrieve total count of shares and likes from Facebook Open Graph for a page

DOWNLOAD:

Here is the DOWNLOAD PHP source and the DEMO INDEX.

HISTORY:

ver.1.9h, added count facebook likes and shares for a url (readFacebookTotalCount)
ver.1.9g, added check if an mp3 exists and is an mp3, minor updates
ver.1.9e, fixed myspace
ver.1.9d, myspace, latitude longitude and more
ver.1.9, wikipedia definitions
ver.1.8, pushMeTo, google suggest
ver.1.7, various fixes and Flickr Feed parser
ver.1.6a, post to facebook fan page wall
ver.1.6, add twitterInfoApi (like twitterInfo but faster), add twitterSetStatus, add twitterGetStatusList, add youtubeGetVideos, googleGetImages
ver.1.5, modified twitterInfo, fixed private functions, addedd facebook status method.
ver.1.4, added twitterInfo, wepage2txt and url2pdf methods.
ver.1.3, added url_exists and getUrlInfo methods.

Posted in

58 comments

  1. James

    Great Class! Any chance of getting the source to the demo pages? I got the twitter class working, with _post["u"] etc, but I think what I have can be done better. Plus when I submit it, it just displays a double of my twitter form where the result should say, bad, ok, etc.

    Could I possibly get the code for the twitter demo page?

  2. how tu use your script

    hi i like your work but how to use it i m new to php, what i whould to do is to get link of first 3 image ( and medium size)

    $k = ‘demo’;
    $images = googleGetImages($k, $quant = 3, $check = false)
    print_r $images;

  3. sampath

    Hii,
    I want to get latitude and longitude from address.
    The demo which you have shown is mapping exactly.
    Can you provide me the entire source.
    Im new to PHP and not able to link it.
    Please help me

  4. gary

    Do you ever tried to curl dropbox.com ?

    Looks impossible but i don’t know why….

    Love your bot class by the way

    thanks

Post a comment

You may use the following HTML:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>