You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is an example from PHP when your IP had been blocked (hope temporary), due too many requests. (IP Ban has beed gone in about 10 mintes)
object(stdClass)#3 (2) {
["status"]=>
string(4) "fail"
["message"]=>
string(49) "Sorry, too many requests. Please try again later."
}
I think there was a sense add something like
if ( isset($media->status) && "fail" == $media->status ) {
//error_log( "Your IP had been blocked by Instagram due too many requests!" );returnfalse;
}
Also I think have sense move code to retreieving data into separated function, like
function_get_remote_data ( $url ) {
$media = json_decode(file_get_contents($url), false);
// Process errors// Return data
}
This allows
Extend main class to override this function and use for example WP funcion for getting results (wp_remote_get)
Avoid code dublicates
The text was updated successfully, but these errors were encountered:
There is an example from PHP when your IP had been blocked (hope temporary), due too many requests. (IP Ban has beed gone in about 10 mintes)
I think there was a sense add something like
Also I think have sense move code to retreieving data into separated function, like
This allows
The text was updated successfully, but these errors were encountered: