Guest User

Untitled

a guest
Dec 10th, 2018
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. <?php
  2.  
  3. foreach (file('/tweet-ids.txt') as $tweet_id) {
  4. $tweet_id = trim($tweet_id);
  5. $url = home_url('index.php').'?'.http_build_query(array(
  6. 'aktt_action' => 'import_tweet',
  7. 'tweet_id' => $tweet_id,
  8. 'social_api_key' => Social::option('system_cron_api_key')
  9. ), null, '&');
  10. // error_log('Importing tweet '.$tweet_id.' '.$url);
  11. wp_remote_get(
  12. $url,
  13. array(
  14. 'timeout' => 0.01,
  15. 'blocking' => false,
  16. 'sslverify' => apply_filters('https_local_ssl_verify', true),
  17. )
  18. );
  19. }
Add Comment
Please, Sign In to add comment