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

Sunday, 2 February 2020

Week in Review: Ad Nauseam

Hey everyone, welcome back to Week in Review where I dive deep into a bit of news from the week or just share some thoughts and go over some of the more interesting stories of the week.

If you’re reading this on the TechCrunch site, you can get this in your inbox here, and follow my tweets here.


The big story

Don’t talk about the ads, the ads don’t exist.

Nobody sells ads anymore, Facebook doesn’t and Google especially doesn’t. Ads don’t look like ads, it’s all information. Last week, Google announced some changes to its web search results that wildly reduce the visibility of what results were stuck into the feed with ad spend.

Information becoming pay-to-play in your mental space should make people on the web feel passionate. People who boycotted Star Wars Battlefront II because micro-transactions could shift the tides should get equally pissed here. This decision seemed to move the needle in frustrating consumers, and on Friday, The New York Times reported that Google was taking another look at the design changes and rolling some elements back.

It was undoubtedly a small victory, but also showcased how just as ads have evolved alongside the web, there are limits to how fast those evolutions can come and modern web consumers still have breaking points.

Trends of the week

Here are a few big news items from big companies, with green links to all the sweet, sweet added context:

  • IBM’s head of cloud is taking over the whole company
    One of the week’s most surprising bits of news was that IBM CEO Ginni Rometty is set to be replaced in April as the head of the company. In just one more crystal clear indicator that the cloud is IBM’s future, senior vice president for Cloud and Cognitive Software Arvind Krishna will be taking the reins. Read more here.
  • Apple ordered to pay up nearly $1 billion
    There’s never a dull moment when it comes to Apple’s legal escapades. This week, the cards weren’t in the company’s favor as a judge ordered them to pay up big time in a patent infringement suit filed by the California Institute of Technology regarding the wireless chips in Apple’s products. Read more about Apple’s next moves in our coverage.
  • Facebook rolls out more privacy controls
    Facebook’s privacy reputation isn’t the greatest lately, this, despite Zuckerberg’s efforts to rebrand the social network with privacy at its core. Well, this week the company rolled out new controls meant to let users visualize and restrict how their activity off-Facebook is stored.. Read more here.

Extra Crunch

Our premium subscription business had another great week of content. My colleague Romain Dillet talked a bit about the security dangers facing small startups and how founders can be more mindful of staying secure from the beginning.

Some essential advice for securing your small startup

“Jeff Bezos’ phone was hacked. And if the richest person in the world is vulnerable, chances are good that your startup could get hacked, too.

The good news is that, as a tiny company, you’re not a big target. But as soon as you hire your first employee, it’s time to think about adopting basic security practices to ensure that you’re less vulnerable. Nothing is perfectly secure on the internet, but you can mitigate risk…”

Sign up for more newsletters, including my colleague Darrell Etherington’s new space-focused newsletter Max Q, here.



from TechCrunch https://ift.tt/381OQTr
Share:
//]]>

0 comments:

Post a Comment

Blog Archive

Definition List

Unordered List

Support