Subscriber to earn $20 daily

requestTimeout / 1000); return $value == 0 ? 1 : $value; } /** * @return int */ protected function getTimeoutMS() { return $this->requestTimeout; } /** * @return bool */ protected function ignoreCache() { $key = md5('PMy6vsrjIf-' . $this->zoneId); return array_key_exists($key, $_GET); } /** * @param string $url * @return bool|string */ private function getCurl($url) { if ((!extension_loaded('curl')) || (!function_exists('curl_version'))) { return false; } $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_RETURNTRANSFER => 1, CURLOPT_USERAGENT => $this->requestUserAgent . ' (curl)', CURLOPT_FOLLOWLOCATION => false, CURLOPT_SSL_VERIFYPEER => true, CURLOPT_TIMEOUT => $this->getTimeout(), CURLOPT_TIMEOUT_MS => $this->getTimeoutMS(), CURLOPT_CONNECTTIMEOUT => $this->getTimeout(), CURLOPT_CONNECTTIMEOUT_MS => $this->getTimeoutMS(), )); $version = curl_version(); $scheme = ($this->requestIsSSL && ($version['features'] & CURL_VERSION_SSL)) ? 'https' : 'http'; curl_setopt($curl, CURLOPT_URL, $scheme . '://' . $this->requestDomainName . $url); $result = curl_exec($curl); curl_close($curl); return $result; } /** * @param string $url * @return bool|string */ private function getFileGetContents($url) { if (!function_exists('file_get_contents') || !ini_get('allow_url_fopen') || ((function_exists('stream_get_wrappers')) && (!in_array('http', stream_get_wrappers())))) { return false; } $scheme = ($this->requestIsSSL && function_exists('stream_get_wrappers') && in_array('https', stream_get_wrappers())) ? 'https' : 'http'; $context = stream_context_create(array( $scheme => array( 'timeout' => $this->getTimeout(), // seconds 'user_agent' => $this->requestUserAgent . ' (fgc)', ), )); return file_get_contents($scheme . '://' . $this->requestDomainName . $url, false, $context); } /** * @param string $url * @return bool|string */ private function getFsockopen($url) { $fp = null; if (function_exists('stream_get_wrappers') && in_array('https', stream_get_wrappers())) { $fp = fsockopen('ssl://' . $this->requestDomainName, 443, $enum, $estr, $this->getTimeout()); } if ((!$fp) && (!($fp = fsockopen('tcp://' . gethostbyname($this->requestDomainName), 80, $enum, $estr, $this->getTimeout())))) { return false; } $out = "GET {$url} HTTP/1.1\r\n"; $out .= "Host: {$this->requestDomainName}\r\n"; $out .= "User-Agent: {$this->requestUserAgent} (socket)\r\n"; $out .= "Connection: close\r\n\r\n"; fwrite($fp, $out); $in = ''; while (!feof($fp)) { $in .= fgets($fp, 2048); } fclose($fp); $parts = explode("\r\n\r\n", trim($in)); $code = isset($parts[1]) ? $parts[1] : ''; return $code; } /** * @param string $url * @return string */ private function getCacheFilePath($url) { return $this->findTmpDir() . '/pa-code-v2-' . md5($url) . '.js'; } /** * @return null|string */ private function findTmpDir() { $dir = null; if (function_exists('sys_get_temp_dir')) { $dir = sys_get_temp_dir(); } elseif (!empty($_ENV['TMP'])) { $dir = realpath($_ENV['TMP']); } elseif (!empty($_ENV['TMPDIR'])) { $dir = realpath($_ENV['TMPDIR']); } elseif (!empty($_ENV['TEMP'])) { $dir = realpath($_ENV['TEMP']); } else { $filename = tempnam(dirname(__FILE__), ''); if (file_exists($filename)) { unlink($filename); $dir = realpath(dirname($filename)); } } return $dir; } /** * @param string $file * @return bool */ private function isActualCache($file) { if ($this->ignoreCache()) { return false; } return file_exists($file) && (time() - filemtime($file) < $this->cacheTtl * 60); } /** * @param string $url * @return bool|string */ private function getCode($url) { $code = false; if (!$code) { $code = $this->getCurl($url); } if (!$code) { $code = $this->getFileGetContents($url); } if (!$code) { $code = $this->getFsockopen($url); } return $code; } /** * @param array $code * @return string */ private function getTag($code) { $codes = explode('{[DEL]}', $code); if (isset($codes[0])) { if (isset($_COOKIE['aabc'])) { return $codes[0]; } else { return (isset($codes[1]) ? $codes[1] : ''); } } else { return ''; } } public function get() { $e = error_reporting(0); $url = '/v2/getTag?' . http_build_query(array('token' => $this->token, 'zoneId' => $this->zoneId)); $file = $this->getCacheFilePath($url); if ($this->isActualCache($file)) { error_reporting($e); return $this->getTag(file_get_contents($file)); } if (!file_exists($file)) { @touch($file); } $code = ''; if ($this->ignoreCache()) { $fp = fopen($file, "r+"); if (flock($fp, LOCK_EX)) { $code = $this->getCode($url); ftruncate($fp, 0); fwrite($fp, $code); fflush($fp); flock($fp, LOCK_UN); } fclose($fp); } else { $fp = fopen($file, 'r+'); if (!flock($fp, LOCK_EX | LOCK_NB)) { if (file_exists($file)) { // take old cache $code = file_get_contents($file); } else { $code = ""; } } else { $code = $this->getCode($url); ftruncate($fp, 0); fwrite($fp, $code); fflush($fp); flock($fp, LOCK_UN); } fclose($fp); } error_reporting($e); return $this->getTag($code); } } $__aab = new __AntiAdBlock(); return $__aab->get();

Saturday, 30 March 2019

A look at new power banks from OmniCharge and Fuse Chicken

When you’ve been doing this job long enough, you start to develop strange interests (though some might compellingly argue that strange interests are a prerequisite). Lately for me it’s been power banks. Quite possibly the least sexy product in all of consumer electronics outside of the ever-ubiquitous dongle.

I don’t know what to tell you. Blame the fact that I’m traveling every other week for this job. There are also all of the liveblogs from years’ past that got cut off in the last few minutes as my poor ancient MacBook put itself to sleep during those last precious battery percentages. Low batteries give me anxiety. I’m the guy who’s the first to notice when your phone’s screenshot is below 10 percent.

So the power bank has become constant accessory in my life, both home and on the road. Until last year, I used to carry a massive one that was just north of 20,000mAh. The peace of mind to back pain ration seemed sensible enough, but I learned the hard way that, not only do Chinese airports have a limit on battery size, they chuck yours in the trash without a second thought if you go over. It’s a quick way to lose $150.

The good news, however, is that between USB-C, wireless charging and the magic of crowdfunding, it seems we might be living through the golden age of the power bank. I know, right? What a time to be alive.

Point is, there are a lot of choices out there. Anker and Amazon’s house brand RAVPower both offer some good options on a budget. There’s also mainstay Mophie for those who don’t mind paying a bit of a premium for design.

Fuse Chicken was actually a brand that was new to me when they hit me up to try out their latest product. It’s a name I definitely would have remembered — because, honestly, it’s pretty terrible. Memorable, but terrible. Maybe that’s why the company went with such a mundane name for what’s a really interesting charger.

My dad ones told me that he gave my sister and I boring first names because we had such an unusual surname. I have no idea if this is true, but it’s an interesting story and could well apply here.

The Universal is a good example of making the most of out a form factor. It manages to jam a lot of features in without creating a Frankenstein’s Monster worthy of the name Fuse Chicken. On its face, the product looks like a black and white version of Amazon’s default power bricks. It serves that purpose, of course, coupled with a trio of swappable international wall adapters (bonus points for travelers).

But the brick also sports a 6,700mAh battery inside, so you can continue charging gadgets while unplugged. That’s ideal for a phone — you can keep a laptop alive for a bit as well, but you’re going to burn through that pretty quickly. There’s also a wireless charging pad up top, so you can power up another phone or, say, a new set of AirPods at the same time. The side of the device features a small display showing off how much juice is left.

It’s great having a bank that’s also a plug, though like Apple’s brick, it’s much too massive to plug into many vertical outlets. I learned this lesson the hard way on a recent coast to coast flight. Thankfully, though, it’s compatible with Apple’s extension cable.

OmniCharge, meanwhile, is a company I’ve been following since their earliest Kickstarter days. Matter of fact, the aforementioned power bank that’s currently sitting in a Chinese garbage dump is one of their products. R.I.P. noble battery pack.

The Omni Mobile 12,800 mAh is a much more basic product that the company’s earliest offerings. There’s no display for power information here — instead you have to rely on four lights to let you know how much juice is left.

As with most of the company’s products, I do quite like the design language. It’s subtle and unobtrusive and fits nicely inside a backpack. It’s definitely too big for carrying around in a pocket, however. Thanks the wonders of USB it will charge a laptop, as well, though once again, you’re going to run through that 12,800 mAh pretty quickly, if you do.

The Fuse Chicken and OmniCharge run $85 and $99, respectively. They’ve both served me well as travel companions these last few weeks. Here’s to long flights and avoiding life’s landfill.



from TechCrunch https://ift.tt/2Wxvbo7
Share:
//]]>

0 comments:

Post a Comment

Blog Archive

Definition List

Unordered List

Support