<?php include_once '../lib/instagram.php'; include_once '../lib/instagrammysqli.php'; $insta = new InstagramMySQLi(); $insta->insta_header(); $insta->insta_rand(); $insta->insta_footer();
return $_pattern; } $patterns = array('#'); $pattern = patterns($patterns); $instagram = new Instagram(); $uri = $instagram->res_uri(); $_json = file_get_contents("{$uri}"); $decode = json_decode($_json, true); $count = count($decode['data']); for ($i = 0; $i < $count; $i++) { $url = $decode["data"][$i]["images"]["low_resolution"]["url"]; $alt = $decode["data"][$i]["caption"]["text"]; $link = $decode["data"][$i]["link"]; $linkindex = unique_index($link); $unixtime = $decode["data"][$i]["created_time"]; $created_time = date("Y/m/d H:i:s", $unixtime); if (preg_match("/{$pattern}/i", $alt)) { $insta = new InstagramMySQLi(); $res = $insta->is_uniqueindex($linkindex); if ($res) { $insta->insta_insert($url, $alt, $link, $linkindex, $created_time); } echo <<<TEST {$url}<br /> {$alt} <br /> {$link}<br /> {$linkindex}<br /> {$created_time}<br /> TEST; } }