type: PIN
Consumer key: 3nVuSoBZnx6U4vzUxf5w
Consumer secret: Bcs59EFbbsdF6Sl9Ng71smgStWEGwXXKSjYvPVt7qys
type: PIN
Consumer key: IQKbtAYlXLripLGPWd0HUA
<?php | |
function multiple_download(array $urls, $save_path = '/tmp') | |
{ | |
$multi_handle = curl_multi_init(); | |
$file_pointers = []; | |
$curl_handles = []; | |
// Add curl multi handles, one per file we don't already have | |
foreach ($urls as $key => $url) { |
var mediaJSON = { "categories" : [ { "name" : "Movies", | |
"videos" : [ | |
{ "description" : "Big Buck Bunny tells the story of a giant rabbit with a heart bigger than himself. When one sunny day three rodents rudely harass him, something snaps... and the rabbit ain't no bunny anymore! In the typical cartoon tradition he prepares the nasty rodents a comical revenge.\n\nLicensed under the Creative Commons Attribution license\nhttp://www.bigbuckbunny.org", | |
"sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4" ], | |
"subtitle" : "By Blender Foundation", | |
"thumb" : "images/BigBuckBunny.jpg", | |
"title" : "Big Buck Bunny" | |
}, | |
{ "description" : "The first Blender Open Movie from 2006", | |
"sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ElephantsDream.mp4" ], |
<?php | |
/** | |
* Draw a rectangle with rounded corners. | |
* @param ressource &$img An image resource | |
* @param int $x1 Upper left x coordinate | |
* @param int $y1 Upper left y coordinate | |
* @param int $x2 Bottom right x coordinate | |
* @param int $y2 Bottom right y coordinate | |
* @param int $r Corners radius | |
* @param int $color A color identifier created with imagecolorallocate() |
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta content='text/html; charset=UTF-8' http-equiv='Content-Type' /> | |
<meta name="twitter:card" content="player" /> | |
<meta name="twitter:site" content="@wakeyio" /> | |
<meta name="twitter:title" content="Hemopure ~ Wakey Wakey #26" /> | |
<meta name="twitter:description" content="Hemopure is an artificial blood (HBOC) that’s saving lives in South Africa. It’s shelf stable and 100% compatible with all blood types." /> | |
<meta name="twitter:image" content="https://wakey.io/public/img/thumbs/26.png" /> | |
<meta name="twitter:player" content="https://wakey.io/embed/26" /> |
Cross-origin resource sharing (CORS) is a mechanism that allows restricted resources (e.g. fonts) on a web page to be requested from another domain outside the domain from which the first resource was served. This is set on the server-side and there is nothing you can do from the client-side to change that setting, that is up to the server/API. There are some ways to get around it tho.
Sources : MDN - HTTP Access Control | Wiki - CORS
CORS is set server-side by supplying each request with additional headers which allow requests to be requested outside of the own domain, for example to your localhost
. This is primarily set by the header:
Access-Control-Allow-Origin
/* | |
If you are attempting to call an AJAX API, via GET which responds: | |
No 'Access-Control-Allow-Origin' header is present on the requested resource. | |
You can modify the way you query it to go through a server which will add the header. | |
Basically, you add the URL you want (with query string parameters) at the end of | |
'https://cors-anywhere.herokuapp.com/' | |
, and ensure that your ajax call is done with some additional options as shown below | |
See CORS-Anywhere documentation here for more: |
http://sample.vodobox.net/skate_phantom_flex_4k/skate_phantom_flex_4k.m3u8 | |
http://playertest.longtailvideo.com/adaptive/wowzaid3/playlist.m3u8 | |
http://cdn-fms.rbs.com.br/vod/hls_sample1_manifest.m3u8 | |
http://nasatv-lh.akamaihd.net/i/NASA_101@319270/index_1000_av-p.m3u8?sd=10&rebase=on | |
http://content.jwplatform.com/manifests/vM7nH0Kl.m3u8 |
$('.ProfileCard-content').each(function(){ | |
var status = $(this).find('.FollowStatus').text(); | |
var unfollowButton = $(this).find('.user-actions-follow-button'); | |
if(!status){ | |
unfollowButton.click(); | |
} | |
}); |
error while loading shared libraries: libnss3.so: cannot open shared object file: No such file or directory
sudo apt-get install libnss3
error while loading shared libraries: libXss.so.1: cannot open shared object file: No such file or directory
sudo apt-get install libxss1