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();

Thursday, 24 September 2020

UK launches COVID-19 exposure notification app for England and Wales

The last two regions of the UK now have an official coronavirus contacts tracing app, after the UK government pushed the button to launch the NHS COVID-19 app across England and Wales today.

Northern Ireland and Scotland launched their own official apps to automate coronavirus exposure notifications earlier this year. But the England and Wales app was delayed after a false start back in May. The key point is that the version that’s launched now has a completely different app architecture.

All three of the UK’s official coronavirus contacts tracing apps make use of smartphones’ Bluetooth radios to generate alerts of potential exposure to COVID-19 — based on estimating the proximity of the devices.

A very condensed version of how this works is that ephemeral IDs are exchanged by devices that come into close contact and stored locally on app users’ phones. If a person is subsequently diagnosed with COVID-19 they are able to notify the system, via their public health authority, which will broadcast the relevant (i.e. ‘risky’) IDs to all other devices.

Matching to see whether an app user has been exposed to any of the risky IDs also takes place locally — meaning exposure alerts are not centralized.

The use of this decentralized, privacy-preserving architecture for the NHS COVID-19 app is a major shift vs the original app which was being designed to centralize data with the public health authority.

However the government U-turned after a backlash over privacy and ongoing technical problems linked to trying to hack its way around iOS limits on background access to Bluetooth.

Switching the NHS COVID-19 app to a decentralized architecture has allowed it to plug into coronavirus exposure notification APIs developed by Apple and Google — resolving technical problems related to device detection which caused problems for the earlier version of the app.

In June, the government suggested there were issues with the APIs related to the reliability of estimating distance between devices. Asked about the reliability of the Bluetooth technology the app is used on BBC Radio 4’s Today program this morning, health secretary Matt Hancock said: “What we know for absolute sure is that the app will not tell you to self isolate because you’ve been in close contact with someone unless you have been in close contact. The accuracy with which it does that is increasing all of the time — and we’ve been working very closely with Apple and with Google who’ve done a great job in working to make this happen and to ensure that accuracy is constantly improved.”

The health secretary described the app as “an important tool in addition to all the other tools that we have” — adding that one of the reasons he’d delayed the launch until now was because he didn’t want to release an app that wasn’t effective.

“Everybody who downloads the app will be helping to protect themselves, helping to protect their loves one, helping to protect their community — because the more people who download it the more effective it will be. And it will help to keep us safe,” Hancock went on.

“One of the things that we’ve learnt over the course of the pandemic is where people are likely to have close contacts and in fact the app that we’re launching today will help to find more of those close contacts,” he added.

The England and Wales app does have some of unique quirks — as the government has opted to pack in multiple features, rather than limiting it to only exposure notifications.

These bells & whistles include: risk alerts based on postcode district; a system of QR code check-in at venues (which are now required by law to display a QR code for app users to scan); a COVID-19 symptom checker and test booking feature — including the ability to get results through the app; and a timer for users who have been told to self-isolate to help them keep count of the number of days left before they can come out of quarantine, with pointers offered to “relevant advice”.

“[The app] helps you to easily go to the pub or a restaurant or hospitality venue because you can then click through on the QR code which automatically does the contact tracing that is now mandatory,” said Hancock explaining the thinking behind some of the extra features. “And it helps by explaining what the rules are and the risk in your area for people easily and straightforwardly to be able to answer questions and consult on the rules so it has a whole series of features.”

It remains to be seen whether it was sensible product design to bolt on all these extras — and QR code venue check-ins could carry a risk of confusing users. However the government’s logic appears to be that more features will encourage more people to download the app and thereby increase uptake and utility.

Once widespread, the mandatory venue QR codes will also effectively double as free ads for the app so that could help drive downloads.

More saliently, the Bluetooth exposure notification system depends on an effective testing regime and will therefore be useless in limiting the spread of COVID-19 if the government can’t improve coronavirus test turnaround times — which it has been struggling with in recent weeks, as major backlogs have built up.

Internet law expert, professor Lilian Edwards — who was on an ethics advisory panel for the earlier, now defunct version of the England & Wales app — made this point to BBC Radio 4’s World at One program yesterday.

“My main concern is not the app itself but the interaction with the testing schedule,” she said. The app only sends out proximity warnings to the contacts on upload of a positive test. The whole idea is to catch contacts before they develop symptoms in that seven-day window when they won’t be isolating. If tests are taking five to seven days to get back then by that time the contacts will have developed symptoms and should hopefully be isolating or reporting their symptoms themselves. So if we don’t speed up testing then the app is functionally useless.”



from TechCrunch https://ift.tt/304rISi
Share:
//]]>

0 comments:

Post a Comment

Blog Archive

Definition List

Unordered List

Support