{"action":"created","issue":{"url":"https://api.github.com/repos/reek/anti-adblock-killer/issues/351","labels_url":"https://api.github.com/repos/reek/anti-adblock-killer/issues/351/labels{/name}","comments_url":"https://api.github.com/repos/reek/anti-adblock-killer/issues/351/comments","events_url":"https://api.github.com/repos/reek/anti-adblock-killer/issues/351/events","html_url":"https://github.com/reek/anti-adblock-killer/issues/351","id":73659943,"number":351,"title":"uptobox.com","user":{"login":"axarad","id":10789454,"avatar_url":"https://avatars.githubusercontent.com/u/10789454?v=3","gravatar_id":"","url":"https://api.github.com/users/axarad","html_url":"https://github.com/axarad","followers_url":"https://api.github.com/users/axarad/followers","following_url":"https://api.github.com/users/axarad/following{/other_user}","gists_url":"https://api.github.com/users/axarad/gists{/gist_id}","starred_url":"https://api.github.com/users/axarad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/axarad/subscriptions","organizations_url":"https://api.github.com/users/axarad/orgs","repos_url":"https://api.github.com/users/axarad/repos","events_url":"https://api.github.com/users/axarad/events{/privacy}","received_events_url":"https://api.github.com/users/axarad/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/reek/anti-adblock-killer/labels/Request","name":"Request","color":"fbca04"},{"url":"https://api.github.com/repos/reek/anti-adblock-killer/labels/Script","name":"Script","color":"207de5"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-05-06T15:42:23Z","updated_at":"2015-05-08T07:55:54Z","closed_at":null,"body":"Hi;\r\nUptobox.com has started today showing a new AdBlock Notification\r\nits powered by\"Adunblock.com\"\r\nHere is a link for example: http://uptobox.com/l53olbk7pzho\r\nHope you can fix it\r\nThank you very much for your time\r\n![snap1](https://cloud.githubusercontent.com/assets/10789454/7496852/b297acd4-f40e-11e4-950d-89a7712b70a8.jpg)\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/reek/anti-adblock-killer/issues/comments/100139973","html_url":"https://github.com/reek/anti-adblock-killer/issues/351#issuecomment-100139973","issue_url":"https://api.github.com/repos/reek/anti-adblock-killer/issues/351","id":100139973,"user":{"login":"vinctux","id":9408266,"avatar_url":"https://avatars.githubusercontent.com/u/9408266?v=3","gravatar_id":"","url":"https://api.github.com/users/vinctux","html_url":"https://github.com/vinctux","followers_url":"https://api.github.com/users/vinctux/followers","following_url":"https://api.github.com/users/vinctux/following{/other_user}","gists_url":"https://api.github.com/users/vinctux/gists{/gist_id}","starred_url":"https://api.github.com/users/vinctux/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vinctux/subscriptions","organizations_url":"https://api.github.com/users/vinctux/orgs","repos_url":"https://api.github.com/users/vinctux/repos","events_url":"https://api.github.com/users/vinctux/events{/privacy}","received_events_url":"https://api.github.com/users/vinctux/received_events","type":"User","site_admin":false},"created_at":"2015-05-08T07:55:54Z","updated_at":"2015-05-08T07:55:54Z","body":"@reek I analyzed AdUnblock a bit... Here are my conclusions:\r\n* They work on PHP, WordPress, Joomla, IPB, Ruby on Rails\r\n* PHP code for websites:\r\n```php\r\n<?php\r\n$aub_cache_file = 'adunblock/cache.html';\r\n$aub_cache_time = 21600;\r\n$ctx = stream_context_create(array('http' => array('timeout' => 3)));\r\nif (file_exists($aub_cache_file) && (time() - $aub_cache_time < filemtime($aub_cache_file))) {\r\n  $aub_html = file_get_contents($aub_cache_file);\r\n} else {\r\n  $aub_html = @file_get_contents('http://adunblock.com/code/bb955c95805ad5bdc8d0fd21eaaaedd9.html', 0, $ctx);\r\n  if (!$aub_html) $aub_html = @file_get_contents($aub_cache_file);\r\n  file_put_contents($aub_cache_file, $aub_html);\r\n}\r\necho $aub_html;\r\n?>\r\n```\r\n* [WordPress Plugin](http://adunblock.com/adunblock_wp_plugin.zip)\r\n* [Joomla Plugin](http://adunblock.com/adunblock_joomla_plugin.zip)\r\n\r\nIn general, if `http://adunblock.com/code/*.html` is blocked it should solve all depending issues - it's universal. If it's blocked, the working of this function is improperly (because it can't retrieve the code script via the ID), and the functionality of AdUnblock is drastic low:\r\n```php\r\nfunction add_adunblock_code() {\r\n  $code = get_transient('code_adunblock');\r\n  $adunblock_id = get_option('adunblock_id');\r\n  $ctx = stream_context_create(array('http' => array('timeout' => 3)));\r\n  if (!$code) {\r\n    $code = @file_get_contents(\"http://adunblock.com/code/$adunblock_id.html\", 0, $ctx);\r\n    if (!$code)\r\n      $code = get_transient('code_adunblock_lt');\r\n    else\r\n      set_transient('code_adunblock_lt', $code, 14 * 86400);\r\n    set_transient('code_adunblock', $code, 6 * 3600);\r\n  }\r\n  echo $code;\r\n}\r\n```\r\nI hope it helps."}}