Giter Site home page Giter Site logo

minibots-php-class's Introduction

Minibots PHP class

This PHP class is a growing collection (I've started in 2010) of small spiders (bots) that go out on the web and make some small useful jobs. It also contains a bunch of useful functions that can help to grow your PHP projects.

For a few years it was sold on Codecanyon, than it became difficult for me to mantain, so I've turned it offline. Now I've decided to make it open source and I've put it on Github.

Some methods aren't working, often due to services no longer available or aquired and deeply changed.

I hope that turning this software "open" will help to make it work again. πŸ’ͺ🏼πŸ’ͺ🏼πŸ’ͺ🏼

You can see it in action in this four test pages:

TEST 1 - TEST 2 - TEST 3 - TEST 4

Disclaimer

Since this software has some functions that scrape data from third parties sites, please remember to use it with moderation and at your own risk. I've created it primarily for small project purposes, and it could help you to build spiders with PHP and easily bring new functionalities to your works. Explore it and be fair, when you create a bot you could harm a server by performing a lot of calls very fast, so pay attention on how you use this software.

Example of usage

/*
  Google spell suggest.
*/
$obj = New Minibots();
$word = $obj->doSpelling("wikipezia"); 
echo $word;

output wiil be

wikipedia

List of bot methods and their status

The bot methods marked with a tick are working. If you want, you can participate in improving this library by fixing methods.

  • doSpelling : spelling suggest with Google
  • doShortURL : make a short url with tinyurl.com
  • doShortURLDecode : expand a short url
  • checkMp3 : check if a url points to an existing mp3 file
  • url_exists : check if an url exists
  • doSMTPValidation : perform smtp validation (not reliable)
  • getUrlInfo : get information on a URL
  • getVideoUrlInfo : get information on a video URL, both yotube or vimeo
  • getVimeoInfo : more information on Vimeo videos
  • readFacebookCounters : get Facebook counters for a url using Facebook APIs (STATUS UNKNOWN)
  • readFacebookPageCounters : read Facebook Page counters using the informations in the meta
  • readTwitterCounter : get number of tweets with the specified url counters for a url
  • googleSuggestKeywords : get the keyword suggestion from Google for a word and return an array with suggested possible keywords
  • getLatLong : get latitute and longitude of a typed address, need an API key (STATUS UNKNOWN)
  • getLatLongBis : another get latitute and longitude of a typed address, need an API key (STATUS UNKNOWN)
  • doGeoIp : get information on user location from its IP address
  • wikiDefinition : get definition of a term from Wikipedia
  • getExchangeRateFromTo : get exchange rate from a currency to another one
  • getImage : return an image from a string
  • getImageBig : return a large image from a string
  • notifyMyDevice : send notification to mobile phone using an app (STATUS UNKNOWN)
  • notifyPushover : send notification to mobile phone using an app (STATUS UNKNOWN)
  • pingomatic : send a ping to pingomatic services to help bloggers (STATUS UNKNOWN)
  • getInstagramFollowers : get Instagram followers count for a user
  • getInstagramPic : get Instagram pic and informations from URL
  • getInstagramPics : get Instagram pictures from a username
  • getInstagramPicsByTag : get Instagram pictures searching with a tag
  • twitterInfo : get Twitter information from username
  • getGravatar : get picture of user from email with Gravatar service
  • getBookData : get book data from ISBN (STATUS UNKNOWN)
  • getLinkedinCounter : get Linkedin shares counter from URL
  • getPinterestCounter : get the number of shares of a URL on Pinterest
  • getImageGoogle : return an image from a string with Google
  • copyFile : copy a remote file to your server

Helper methods

  • getIP : get ip address of user
  • dayadd : add days to a date
  • attr : return the html attribute of a given tag, used for scraping HTML
  • betweenTags : return a part of a string between two tags, used for scraping HTML
  • getTags : return the array of matches when searching for a tag serie while scraping HTML
  • makeabsolute : maker an url absolute when scraping HTML
  • getPagePost : use cURL to get a page with POST variables
  • getPage : get a page with cURL or file_get_contents
  • findLinks : extract all the links from a page
  • findEmails : extract all the email addresses from a page
  • justText : return just text from a web page

Private methods

  • getHttpResponseCode
  • getRemoteFileSize
  • on_curl_header
  • on_curl_write

minibots-php-class's People

Contributors

giuliopons avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.