Exemple #1
0
<?php

include "head.php";
require "fllat.php";
$components = new Fllat("components", "../atomic-db");
$categories = new Fllat("categories", "../atomic-db");
$settings = new Fllat("settings", "../atomic-db");
$compSelect = $components->select(array());
$categories = $categories->select(array());
$settings = $settings->select(array());
?>
<body id="atomsWrap" class="atoms" xmlns="http://www.w3.org/1999/html">


<div class="grid-row atoms-container">
    <div class="atoms-side_show-small ">
        <span class="toggle-line"></span>
        <span class="toggle-line"></span>
        <span class="toggle-line"></span>
    </div>
    <div class="atoms-side_show ">
        <span class="js-showSide fa fa-arrow-right"></span>
    </div>
    <aside class="atoms-side">
        <div class="atoms-overflow">
            <form class="atomic-search" method="GET">
                <input class="searchInput" type="text" placeholder="Search components" name="search"/>
            </form>
            <div class="atoms-side_hide">
                <span class="js-hideSide navIcon navIcon-left fa fa-arrow-left"></span>
                <span class="navIcon js_searchTrigger  fa fa-search "></span>
Exemple #2
0
 /**
  * Merges two databases and gets rid of duplicates
  *
  * @param array $cols   the columns to merge
  * @param Fllat $second the second database to merge
  *
  * @return array          the merged array
  */
 function union($cols, $second)
 {
     return array_map("unserialize", array_unique(array_map("serialize", array_merge($this->select($cols), $second->select($cols)))));
 }
 * @created: 01/10/2015
 * @author: @jakelprice
 *
*/
header('content-type: application/json; charset=utf-8');
header("access-control-allow-origin: *");
date_default_timezone_set('Europe/London');
ini_set("display_errors", "1");
error_reporting(E_ALL);
require "twitter.php";
require "fllat.php";
require "pusher.php";
//-- Setup systems
//-- DB is in a writeable folder called db/ make sure it is created
//-- before you start :)
$pie = new Fllat("search");
//-- Twitter Settings
$settings = array('oauth_access_token' => "", 'oauth_access_token_secret' => "", 'consumer_key' => "", 'consumer_secret' => "");
//-- Pusher Settings
$pushers = array('app_id' => "", 'app_key' => "", 'app_secret' => "");
//-- Hashtag to search
$search = "#hackference";
//-- Out main details
$main = array();
//-- Get Tweets
$url = 'https://api.twitter.com/1.1/search/tweets.json';
$getfield = '?q=' . $search;
$requestMethod = 'GET';
$twitter = new TwitterAPIExchange($settings);
$response = $twitter->setGetfield($getfield)->buildOauth($url, $requestMethod)->performRequest();
//-- Pusher time