Skip to content

Instantly share code, notes, and snippets.

License Key PhpStorm 8
User Name : EMBRACE
===== LICENSE BEGIN =====
43136-12042010
00002UsvSON704l"dILe1PVx3y4"B3
49AU6oSDJrsjE8nMOQh"8HTDJHIUUh
gd1BebYc5U"6OxDbVsALB4Eb10PW8"
===== LICENSE END =====
<?php
/**
* @see http://stackoverflow.com/questions/40836144/php-how-to-get-images-from-instagram-without-api-access-token
* You can use function file_get_conents instead wp_remote_get
*/
function get_instagram_images( $username, $limit = 100 ){
$profile_url = "https://www.instagram.com/$username/?__a=1";
$iteration_url = $profile_url;
@llemurya
llemurya / expect-header-fix.php
Created March 10, 2021 22:31 — forked from carlalexander/expect-header-fix.php
WordPress "Expect" header fix
<?php
/**
* By default, cURL sends the "Expect" header all the time which severely impacts
* performance. Instead, we'll send it if the body is larger than 1 mb like
* Guzzle does.
*/
function add_expect_header(array $arguments)
{
$arguments['headers']['expect'] = !empty($arguments['body']) && strlen($arguments['body']) > 1048576 ? '100-Continue' : '';