This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require_once('vendor/autoload.php'); | |
use GuzzleHttp\Client as GuzzleClient; | |
use GuzzleHttp\Promise as GuzzlePromise; | |
//https://stackoverflow.com/a/32751004/3787302 | |
$start_time = microtime(TRUE); | |
$client = new GuzzleClient(['timeout' => 12.0]); // see how i set a timeout | |
$requestPromises = []; | |
$sitesArray = [ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"kind": "youtube#searchResult", | |
"etag": "\"XI7nbFXulYBIpL0ayR_gDh3eu1k/iecMlihzF4qEDkzXsB6TUt81Oqw\"", | |
"id": { | |
"kind": "youtube#video", | |
"videoId": "M4ZoCHID9GI" | |
}, | |
"snippet": { | |
"publishedAt": "2018-04-12T16:00:04.000Z", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"entities": { | |
"snippets": { | |
"aJOTlE1K90k": { | |
"publishedAt": "2018-05-31T04:00:00.000Z", | |
"channelId": "UCN1hnUccO4FD5WfM7ithXaw", | |
"title": "Maroon 5 - Girls Like You ft. Cardi B", | |
"description": "\"Girls Like You” is out now. http://smarturl.it/GLY For more, visit: https://www.facebook.com/maroon5 https://twitter.com/maroon5 ...", | |
"thumbnails": { | |
"default": { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Package ioc provides a simple inversion of control container for registering and resolving services. | |
package ioc | |
import ( | |
"fmt" | |
"sync" | |
) | |
// container holds the registered services and provides thread-safe access. | |
type container struct { |
OlderNewer