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:
- check if a remote mp3 exists and is an mp3
- search Myspace Concerts (DEMO)
- search Google and get the spelling suggest (DEMO) *KO
- search Google and retrieve the meteo information for a place
- search Bank Of Italy service to get exchange rates for a specified currency
- search GeoIpTool to retrieve geographical information from a specified IP address (DEMO)
- contact any mail server to validate email address through smtp protocol (DEMO)
- call tinyurl.com to get a tiny url of a specified long url (DEMO)
- decode any small url to the original long url (DEMO)
- url checker to see if a url exists
- get url infos to get data about a page (title, description, favicon, images) (DEMO)
- retrieves all the text from a url
- convert a url to a pdf and save it to a local file
- get twitter users info from web page and from Twitter’s API
- set twitter status
- get twitter statuses update list
- get video list uploaded by a user in Youtube (DEMO)
- get first page of url images from Google Images (DEMO) *KO
- change facebook status
- post to facebook fan page wall
- parsing rss flickr feed of a user (DEMO)
- sending push alerts to iPhone (DEMO)
- google suggest keywords service (DEMO)
- find definitions on Wikipedia (DEMO)
- convert a street address to latitude/longitude coordinates (DEMO)
- 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.
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?
googlegetimages not working =(
This is very helpfull for me.
Thanks
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;
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
google has changed its code.
Do you ever tried to curl dropbox.com ?
Looks impossible but i don’t know why….
Love your bot class by the way
thanks
I think dropbox has api libraries, probably it’s better use the apis.