public function __construct()
 {
     if (Agent::isMobile()) {
         $this->_vista = 'mobile';
     } else {
         $this->_vista = 'index';
     }
     $this->_imagesInstagram = array();
     $this->_imagesTwitter = array();
     $instagram = new instagram(array('apiKey' => '09fd60952ea742d5abb761b6c6a137aa', 'apiSecret' => 'ee25063e91e74d6c9f257be054a44ec3', 'apiCallback' => 'http://viernesdezapatillas.pe/'));
     $tagInstagram = 'viernesdezapatillas';
     $numphotosInstagram = 15;
     $media = $instagram->getTagMedia($tagInstagram, $auth = false, array('count' => $numphotosInstagram));
     $response = json_decode(json_encode($media));
     foreach ($response->data as $data) {
         $this->_imagesInstagram[] = $data->images->thumbnail->url;
     }
     $max_id = 0;
     $totalTweets = 15;
     $responset = Twitter::getSearch(array('q' => '#viernesdezapatillas since:2015-07-01 filter:images', 'count' => $totalTweets, 'max_id' => $max_id, 'since_id' => 0));
     foreach ($responset->statuses as $tweet) {
         foreach ($tweet->entities->media as $url) {
             $this->_imagesTwitter[] = $url->media_url;
             // . ':thumb';
         }
     }
 }
Example #2
0
<?php

include_once '../../head.php';
$ig = new instagram();
if (!empty($_GET['query'])) {
    $ig = new instagram();
    $query = $_GET['query'];
    $ig->search_users($query);
} else {
    ?>
    <script>
    $(document).ready(function(){
        $('#user_search').addClass('open');
        $('#user_search > form > input[type="search"]').focus();
    });
    </script>

<?php 
}
include_once '../../footer.php';
Example #3
0
<?php

ini_set('display_startup_errors', 1);
ini_set('display_errors', 1);
error_reporting(-1);
include_once 'head.php';
$ig = new instagram();
if (isset($_GET['location'])) {
    $loc = $_GET['location'];
    $geo = get_lat_lang($loc);
    $ig->get_media_by_location($geo);
} else {
    ?>
    <script>
        $(document).ready(function(){
            $('#search').addClass('open');
            $('#search > form > input[type="search"]').focus();
        });
        </script>

<?php 
}
include_once 'footer.php';
Example #4
0
<?php

include_once '../head.php';
if (!empty($_GET['id']) && !empty($_GET['username'])) {
    $id = $_GET['id'];
    $ig = new instagram();
    $ig->get_user_media($id);
    $username = $_GET['username'];
} elseif (empty($_GET['id']) && !empty($_GET[username])) {
    echo 'username by no id';
    $username = $_GET['username'];
    header("location: http://iglookup.com/user/search/{$username}");
}
include_once '../footer.php';
Example #5
0
<?php

include_once 'head.php';
$location_url = "https://freegeoip.net/json/" . $_SERVER['HTTP_X_FORWARDED_FOR'];
$location_json = file_get_contents($location_url);
$location_array = json_decode($location_json, true);
echo '<div class="well col-md-12 text-center"><p>We have detected your location to be ' . $location_array['city'] . ', ' . $location_array['region_name'] . ', ' . $location_array['country_name'] . '.</p></div>';
$ig = new instagram();
$ig->get_media_by_location(get_lat_lang($location_array['city']));
include_once 'footer.php';
<?php

require_once '../../../inc/tplshortcuts.lib.php';
kInitBettino('../../../');
require_once '../inc/functions.php';
error_reporting(E_ALL);
$instagram = new instagram();
if (isset($_GET['hub_mode']) && $_GET['hub_mode'] == 'subscribe' && isset($_GET['hub_challenge'])) {
    echo $_GET['hub_challenge'];
    die;
}
$clientID = '0d4788d97d3d4f74af57f9654c4b2742';
$userid = '1554280483';
// get recent images
// Initialize session and set URL.
$url = "https://api.instagram.com/v1/users/" . $userid . "/media/recent?&count=10&client_id=" . $clientID . "";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
// accept any SSL certificate
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
// Set so curl_exec returns the result instead of outputting it.
$response = curl_exec($ch);
curl_close($ch);
$photos = json_decode($response);
if ($photos->{'meta'}->{'code'} == 200) {
    foreach ($photos->{'data'} as $photo) {
        //print_r($photo);
        //echo '<br><br>';
        //if(!isset($photo->{'location'})) continue; // skip non-geotagged posts
        $link = $photo->{'link'};