GithubHelp home page GithubHelp logo

search_hashtag's Introduction

search_hashtag

prerequisites:

mysql, curl https://curl.haxx.se/docs/install.html , phinx https://robmorgan.id.au/posts/getting-started-with-phinx/ , crontab https://www.cyberciti.biz/faq/how-do-i-add-jobs-to-cron-under-linux-or-unix-oses/

  1. create files DBConfig.php and TwitterConfig.php and make entries following pattern from DBConfigSample.php and TwitterConfigSample.php

  2. cretae database testDb.

  3. run migration. After following https://robmorgan.id.au/posts/getting-started-with-phinx/ to set up phinx change phinx.yml and make entries accordingly. Then run migration "php vendor/bin/phinx migrate" this will create tweet,hash_tag,hash_tag_tweet_mapper tables.

  4. run cron present in folder cron_jobs "FetchHashtag.php" by command which takes argument hasgtag name by which you want to search. php FetchHashtag.php --hash_tag london

here london is what we want to search for.

  1. make entry in cron tab https://curl.haxx.se/docs/install.html .

     * * * * *  /path/tp/php /full/path/to/file/FetchHashtag.php --hash_tag london >>/full/path/to/file/cron.log
    

for example * * * * * /usr/bin/php /var/www/html/search_hashtag/cron_jobs/FetchHashtag.php --hash_tag london >> /var/www/html/search_hashtag/cron_jobs/cron.log

  1. after everything is set up start your server in project folder (inbuilt php server can be started by php -S localhost:8080) visit localhost:8080

search_hashtag's People

Contributors

n33l avatar

Watchers

 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.