$ip = $_SERVER['REMOTE_ADDR']; $ua = $_SERVER['HTTP_USER_AGENT']; if ($ip =="10.10.10.101"){ #ini_set('display_errors', 1); #ini_set('display_startup_errors', 1); #error_reporting(E_ALL); } $actual_link = $_SERVER['PHP_SELF']; $list = file("/var/wwwroot/westnet.ca/bannedipan.txt", FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES); #if (preg_match('/bot|semrush|riddler|qwant|curl|dataprovider|riddler|daum|get|spider|find|java|majesticsEO|teoma|contaxe|yandex|libwww-perl|abacho|accona|AddThis|AdsBot|ahoy|AhrefsBot|AISearchBot|alexa|altavista|anthill|appie|applebot|arale|araneo|AraybOt|ariadne|arks|aspseek|ATN_Worldwide|Atomz|baiduspider|baidu|bbot|bingbot|bing|Bjaaland|BlackWidow|BotLink|bot|boxseabot|bspider|calif|CCBot|ChinaClaw|christcrawler|CMC\/0\.01|combine|confuzzledbot|contaxe|CoolBot|cosmos|crawler|crawlpaper|crawl|curl|cusco|cyberspyder|cydralspider|dataprovider|digger|DIIbot|DotBot|downloadexpress|DragonBot|DuckDuckBot|dwcp|EasouSpider|ebiness|ecollector|elfinbot|esculapio|ESI|esther|eStyle|Ezooms|facebookexternalhit|facebook|facebot|fastcrawler|FatBot|FDSE|FELIX IDE|fetch|fido|find|Firefly|fouineur|Freecrawl|froogle|gammaSpider|gazz|gcreep|geona|Getterrobo-Plus|get|girafabot|golem|grabber|GrabNet|griffon|Gromit|gulliver|gulper|hambot|havIndex|hotwired|htdig|HTTrack|ia_archiver|iajabot|IDBot|Informant|InfoSeek|InfoSpiders|INGRID\/0\.1|inktomi|inspectorwww|Internet Cruiser Robot|irobot|Iron33|JBot|jcrawler|Jeeves|jobo|KDD\-Explorer|KIT\-Fireball|ko_yappo_robot|label\-grabber|larbin|legs|libwww-perl|linkedin|Linkidator|linkwalker|Lockon|logo_gif_crawler|Lycos|m2e|majesticsEO|marvin|mattie|mediafox|mediapartners|MerzScope|MindCrawler|MJ12bot|mod_pagespeed|moget|Motor|msnbot|muncher|muninn|MuscatFerret|MwdSearch|NationalDirectory|naverbot|NEC\-MeshExplorer|NetcraftSurveyAgent|NetScoop|NetSeer|newscan\-online|nil|none|Nutch|ObjectsSearch|Occam|openstat.ru\/Bot|packrat|pageboy|ParaSite|patric|pegasus|perlcrawler|phpdig|piltdownman|Pimptrain|pingdom|pinterest|pjspider|PlumtreeWebAccessor|PortalBSpider|psbot|rambler|Raven|RHCS|RixBot|roadrunner|Robbie|robi|RoboCrawl|robofox|Scooter|Scrubby|Search\-AU|searchprocess|search|SemrushBot|Senrigan|seznambot|Shagseeker|sharp\-info\-agent|sift|SimBot|Site Valet|SiteSucker|skymob|SLCrawler\/2\.0|snooper|solbot|speedy|spider_monkey|SpiderBot\/1\.0|spiderline|spider|suke|tach_bw|TechBOT|TechnoratiSnoop|templeton|teoma|titin|topiclink|twitterbot|twitter|UdmSearch|Ukonline|UnwindFetchor|URL_Spider_SQL|urlck|urlresolver|Valkyrie libwww\-perl|verticrawl|Victoria|void\-bot|Voyager|VWbot_K|wapspider|WebBandit\/1\.0|webcatcher|WebCopier|WebFindBot|WebLeacher|WebMechanic|WebMoose|webquest|webreaper|webspider|webs|WebWalker|WebZip|wget|whowhere|winona|wlm|WOLP|woriobot|WWWC|XGET|xing|yandex|yeti|Zeus/i', $_SERVER['HTTP_USER_AGENT'])){ #if (preg_match('/(?!\googlebot)|bot|semrush|riddler|curl|dataprovider|riddler|daum|get|spider|find|java|majesticsEO|teoma|contaxe|yandex|libwww-perl/i', $_SERVER['HTTP_USER_AGENT'])) { #if (preg_match('/bot|semrush|riddler|curl|dataprovider|riddler|daum|get|spider|find|java|majesticsEO|teoma|contaxe|yandex|libwww-perl/i', $_SERVER['HTTP_USER_AGENT'])) { #if (preg_match('/bot|semrush|riddler|qwant|curl|dataprovider|riddler|daum|get|spider|find|java|majesticsEO|teoma|contaxe|yandex|libwww-perl|abacho|accona|AddThis|AdsBot|ahoy|AhrefsBot|AISearchBot|alexa|altavista|anthill|appie|applebot|arale|araneo|AraybOt|ariadne|arks|aspseek|ATN_Worldwide|Atomz|baiduspider|baidu|bbot|bingbot|bing|Bjaaland|BlackWidow|BotLink|bot|boxseabot|bspider|calif|CCBot|ChinaClaw|christcrawler|CMC\/0\.01|combine|confuzzledbot|contaxe|CoolBot|cosmos|crawler|crawlpaper|crawl|curl|cusco|cyberspyder|cydralspider|dataprovider|digger|DIIbot|DotBot|downloadexpress|DragonBot|DuckDuckBot|dwcp|EasouSpider|ebiness|ecollector|elfinbot|esculapio|ESI|esther|eStyle|Ezooms|facebookexternalhit|facebook|facebot|fastcrawler|FatBot|FDSE|FELIX IDE|fetch|fido|find|Firefly|fouineur|Freecrawl|froogle|gammaSpider|gazz|gcreep|geona|Getterrobo-Plus|get|girafabot|golem|grabber|GrabNet|griffon|Gromit|gulliver|gulper|hambot|havIndex|hotwired|htdig|HTTrack|ia_archiver|iajabot|IDBot|Informant|InfoSeek|InfoSpiders|INGRID\/0\.1|inktomi|inspectorwww|Internet Cruiser Robot|irobot|Iron33|JBot|jcrawler|Jeeves|jobo|KDD\-Explorer|KIT\-Fireball|ko_yappo_robot|label\-grabber|larbin|legs|libwww-perl|linkedin|Linkidator|linkwalker|Lockon|logo_gif_crawler|Lycos|m2e|majesticsEO|marvin|mattie|mediafox|mediapartners|MerzScope|MindCrawler|MJ12bot|mod_pagespeed|moget|Motor|msnbot|muncher|muninn|MuscatFerret|MwdSearch|NationalDirectory|naverbot|NEC\-MeshExplorer|NetcraftSurveyAgent|NetScoop|NetSeer|newscan\-online|nil|none|Nutch|ObjectsSearch|Occam|openstat.ru\/Bot|packrat|pageboy|ParaSite|patric|pegasus|perlcrawler|phpdig|piltdownman|Pimptrain|pingdom|pinterest|pjspider|PlumtreeWebAccessor|PortalBSpider|psbot|rambler|Raven|RHCS|RixBot|roadrunner|Robbie|robi|RoboCrawl|robofox|Scooter|Scrubby|Search\-AU|searchprocess|search|SemrushBot|Senrigan|seznambot|Shagseeker|sharp\-info\-agent|sift|SimBot|Site Valet|SiteSucker|skymob|SLCrawler\/2\.0|snooper|solbot|speedy|spider_monkey|SpiderBot\/1\.0|spiderline|spider|suke|tach_bw|TechBOT|TechnoratiSnoop|templeton|teoma|titin|topiclink|twitterbot|twitter|UdmSearch|Ukonline|UnwindFetchor|URL_Spider_SQL|urlck|urlresolver|Valkyrie libwww\-perl|verticrawl|Victoria|void\-bot|Voyager|VWbot_K|wapspider|WebBandit\/1\.0|webcatcher|WebCopier|WebFindBot|WebLeacher|WebMechanic|WebMoose|webquest|webreaper|webspider|webs|WebWalker|WebZip|wget|whowhere|winona|wlm|WOLP|woriobot|WWWC|XGET|xing|yahoo|YandexBot|YandexMobileBot|yandex|yeti|Zeus/i', $_SERVER['HTTP_USER_AGENT'])){ #if (preg_match('/bot|crawl|curl|qwant|dataprovider|search|get|spider|find|java|majesticsEO|teoma|contaxe|yandex|libwww-perl/i', $_SERVER['HTTP_USER_AGENT'], $matches)) { if (preg_match('/^(?!.*\bgooglebot\b)(?!.*\bslurp\b)(?!.*\byandex\b)(?!.*\bbing\b).*?(?:bot|crawl|qwant|curl|dataprovider|search|get|spider|find|java|majesticsEO|yahoo|teoma|contaxe|yandex|libwww-perl|abacho|accona|AddThis|AdsBot|ahoy|AhrefsBot|AISearchBot|alexa|altavista|anthill|appie|arale|araneo|AraybOt|ariadne|arks|aspseek|ATN_Worldwide|Atomz|baiduspider|baidu|bbot|bingbot|bing|Bjaaland|BlackWidow|BotLink|bot|boxseabot|bspider|calif|CCBot|ChinaClaw|christcrawler|CMC\/0\.01|combine|confuzzledbot|contaxe|CoolBot|cosmos|crawler|crawlpaper|crawl|curl|cusco|cyberspyder|cydralspider|dataprovider|digger|DIIbot|DotBot|downloadexpress|DragonBot|DuckDuckBot|dwcp|EasouSpider|ebiness|ecollector|elfinbot|esculapio|ESI|esther|eStyle|Ezooms|facebot|fastcrawler|FatBot|FDSE|FELIX IDE|fetch|fido|find|Firefly|fouineur|Freecrawl|froogle|gammaSpider|gazz|gcreep|geona|Getterrobo-Plus|get|girafabot|golem|grabber|GrabNet|griffon|Gromit|gulliver|gulper|hambot|havIndex|hotwired|htdig|HTTrack|ia_archiver|iajabot|IDBot|Informant|InfoSeek|InfoSpiders|INGRID\/0\.1|inktomi|inspectorwww|Internet Cruiser Robot|irobot|Iron33|JBot|jcrawler|Jeeves|jobo|KDD\-Explorer|KIT\-Fireball|ko_yappo_robot|label\-grabber|larbin|legs|libwww-perl|linkedin|Linkidator|linkwalker|Lockon|logo_gif_crawler|Lycos|m2e|majesticsEO|marvin|mattie|mediafox|mediapartners|MerzScope|MindCrawler|MJ12bot|mod_pagespeed|moget|Motor|msnbot|muncher|muninn|MuscatFerret|MwdSearch|NationalDirectory|naverbot|NEC\-MeshExplorer|NetcraftSurveyAgent|NetScoop|NetSeer|newscan\-online|nil|none|Nutch|ObjectsSearch|Occam|openstat.ru\/Bot|packrat|pageboy|ParaSite|patric|pegasus|perlcrawler|phpdig|piltdownman|Pimptrain|pingdom|pinterest|pjspider|PlumtreeWebAccessor|PortalBSpider|psbot|rambler|Raven|RHCS|RixBot|roadrunner|Robbie|robi|RoboCrawl|robofox|Scooter|Scrubby|Search\-AU|searchprocess|search|SemrushBot|Senrigan|seznambot|Shagseeker|sharp\-info\-agent|sift|SimBot|Site Valet|SiteSucker|skymob|SLCrawler\/2\.0|snooper|solbot|speedy|spider_monkey|SpiderBot\/1\.0|spiderline|spider|suke|tach_bw|TechBOT|TechnoratiSnoop|templeton|teoma|titin|topiclink|UdmSearch|Ukonline|UnwindFetchor|URL_Spider_SQL|urlck|urlresolver|Valkyrie libwww\-perl|verticrawl|Victoria|void\-bot|Voyager|VWbot_K|wapspider|WebBandit\/1\.0|webcatcher|WebCopier|WebFindBot|WebLeacher|WebMechanic|WebMoose|webquest|webreaper|webspider|webs|WebWalker|WebZip|wget|whowhere|winona|wlm|WOLP|woriobot|WWWC|XGET|xing|yeti|Zeus)/i', $_SERVER['HTTP_USER_AGENT'], $matches)) { $arr = $matches; $uafound = $arr['0']; #echo "Useragent Match: $uafound\n"; #Goodbots "Googlebot" OR "bingbot" OR "Yahoo" OR "Slurp" OR "DuckDuckBot" if (in_array($ip, $list) ){ #echo "$ip FOUND IN FILE $ua $uafound"; }else{ #echo "$ip NOT FOUND IN FILE $ua $uafound"; if ($ip !=="10.10.10.101" ){ #$ht = "Deny from $ip"; file_put_contents("/var/wwwroot/westnet.ca/bannedipan.txt", $ip."\n", FILE_APPEND); #file_put_contents("/var/wwwroot/westnet.ca/.htaccess", $ht."\n", FILE_APPEND); file_put_contents("/var/wwwroot/westnet.ca/bannedbots.txt", "$ip $ua Useragent Match: $uafound\n", FILE_APPEND); } } /* header("HTTP/1.1 503 Service Temporarily Unavailable"); header("Status: 503 Service Temporarily Unavailable"); header("Retry-After: 3600"); echo '
We expect to have the site back up within 4 hours.
'; exit; */ #} }#goodbotcheck /* if (in_array($ip, $list) ){ #echo "$ip FOUND IN FILE, last array"; header("HTTP/1.1 503 Service Temporarily Unavailable"); header("Status: 503 Service Temporarily Unavailable"); header("Retry-After: 3600"); echo 'We expect to have the site back up within 4 hours.
'; exit; } */ # '../', 'passwd', 'UNION' if (strpos($urlg, '../') !== false) { echo 'fuck off'; die(); } if (strpos($article, '../') !== false) { echo 'fuck off'; die(); } if (strpos($vl, '../') !== false) { echo 'fuck off'; die(); } $banned[0]="5.79.105.131"; if (in_array($_SERVER['REMOTE_ADDR'],$banned)) { header("HTTP/1.1 403 Forbidden"); exit; } $banned[0]="202.46.51.210"; if (in_array($_SERVER['REMOTE_ADDR'],$banned)) { header("HTTP/1.1 403 Forbidden"); exit; } $host = $_SERVER['HTTP_HOST']; $uri = $_SERVER['REQUEST_URI']; $domainname = $_SERVER['HTTP_HOST']; #if ($domainname != "action.news"){ #$uri = $_SERVER['REQUEST_URI']; #Header( "HTTP/1.1 301 Moved Permanently" ); #Header( "Location: http://action.news$uri" ); #} if ($domainname == "www.telus.com.fiber.westnet.ca"){ $cdn = "https://$domainname"; } else { #$cdn = "https://secure.action.news"; } // find out the domain: $domain = $_SERVER['HTTP_HOST']; // find out the path to the current file: $path = $_SERVER['SCRIPT_NAME']; // find out the QueryString: $queryString = $_SERVER['QUERY_STRING']; // put it all together: $url = "//" . $domain . $path . "?" . $queryString; #$items = array(westnet,westnethd,forestlawnalberta); #$fblikename = $items[array_rand($items)]; $fblikename = "westnethd"; $range_start = ip2long("207.35.0.0"); $range_end = ip2long("207.35.255.255"); $ip = ip2long($_SERVER['REMOTE_ADDR']); if ($ip >= $range_start && $ip <= $range_end) { // alert $ip = $_SERVER["REMOTE_ADDR"]; $referer = $_SERVER['HTTP_REFERER']; $hostname = gethostbyaddr($_SERVER['REMOTE_ADDR']); $ua = $_SERVER['HTTP_USER_AGENT']; $to = "cs.security-207.35.0.0@westnet.ca"; $subject = "Calgary Stampede Snooping $url"; $body = "$ip $hostname read $url from $referer $ua"; if (mail($to, $subject, $body)) { echo(""); } else { echo(""); } } $referer = $_SERVER['HTTP_REFERER']; if (strpos($referer,'facebook') !== false) { // alert $ip = $_SERVER["REMOTE_ADDR"]; $hostname = gethostbyaddr($_SERVER['REMOTE_ADDR']); $ua = $_SERVER['HTTP_USER_AGENT']; #$to = "fb-visitor@westnet.ca"; $subject = "$url"; $body = "$ip $hostname read $url from $referer $ua"; if (mail($to, $subject, $body)) { echo(""); } else { echo(""); } } $hostname = gethostbyaddr($_SERVER['REMOTE_ADDR']); if (strpos($hostname,'tfbnw') !== false) { // alert $ip = $_SERVER["REMOTE_ADDR"]; $ua = $_SERVER['HTTP_USER_AGENT']; #$to = "fb-visitor@westnet.ca"; $subject = "$url"; $body = "$ip $hostname read $url from $referer $ua"; if (mail($to, $subject, $body)) { echo(""); } else { echo(""); } } $range_start = ip2long("216.239.0.0"); $range_end = ip2long("216.239.255.255"); $ip = ip2long($_SERVER['REMOTE_ADDR']); if ($ip >= $range_start && $ip <= $range_end) { // alert $ip = $_SERVER["REMOTE_ADDR"]; $referer = $_SERVER['HTTP_REFERER']; $hostname = gethostbyaddr($_SERVER['REMOTE_ADDR']); $ua = $_SERVER['HTTP_USER_AGENT']; $to = "security-216.239.0.0@westnet.ca"; $subject = "Google Snooping $url"; $body = "$ip $hostname read $url from $referer $ua"; if (mail($to, $subject, $body)) { echo(""); } else { echo(""); } } $ip = $_SERVER['REMOTE_ADDR']; ?>WHO'S LONDON: Wireless Internet access to maps, media and e-mails creates a positive first impression to visitors in cities such as Stratford
It was a smart move that paid off.
With more than 500,000 visitors a year, Stratford wanted to do something to make its guests feel welcome.
To set itself apart, the city-owned business Rhyzome Networks offered people Wi-Fi access to 20 websites -- everything from the city's municipal site, to tourism, economic development, local media, school boards, hospitals and some doctor web portals.
The Free Press is exploring the growing trend of free Wi-Fi downtown — one suggestion from our reader forum, Core Reaction -- and how other cities have built success from making it happen. A Downtown London task force is also plumbing the issue and is expected to launch a pilot project soon.
In Stratford, free Wi-Fi -- wireless Internet access -- is one reason the city was named one of the seven most intelligent communities in the world by the New York-based Intelligent Community Forum.
And the city has already reaped benefits from the move.
"We see Wi-Fi as the first impression people can have of Stratford technologically or digitally," said Paul West, business development manager for Rhyzome.
The online "freezone," as it's called, isn't just for visitors but also for residents, who have access to the library's database from their smart phones, laptops or iPads anywhere in the city.
"Our library is the leading library for digital media," West said.
"People of all incomes, demographics, ages, mobilities have access to the content."
Their commitment has drawn other business: a company in Palo Alto, Calif., is launching a new digital TV platform. The technology is being developed in Silicon Valley, but the company is using Stratford as a test market.
"It's because of who we are and what we've invested in the digital infrastructure," West said.
Rhyzome also is using Wi-Fi technology to help recruit doctors, offering them a secure access channel so they can check and manage patient records from anywhere in the city. The service is a paid one, West said.
"We're keeping residents and businesses in Stratford because of what we're offering and we're attracting new residents and businesses to Stratford because this is what they want and need," he said.
Other cities across North America are either looking at offering free Wi-Fi or have already done so. Though you might expect larger cities such as New York, Toronto and Seattle to offer the service, smaller cities are offering it, too.
Raleigh, N.C., has a population of just under 500,000 and is part of a knowledge triangle of cities with major research universities. The city topped Forbes magazine's 2010 list of the most-wired U.S. cities because of the availability of free Wi-Fi.
"Most free wireless services are offered as a convenience, offering short-term access," said Catherine Middleton, an associate professor at Ryerson University who has studied community and municipal wireless networks.
"They enable things like checking e-mail, looking up directions, perhaps watching a quick video, but are not intended to substitute for a permanent Internet connection."
Calgary was one of Canada's first cities to offer free Wi-Fi downtown. Residents are directed to a sign-up page that then adds ads to websites, said Abdul Traya, owner of WestNet, the company that offers the service.
"People love it," Traya said of the service that began in 2002. "Tourists use it to find maps, locations and stuff on their iPads."
Stratford has had its "freezone" for about a year without ads, though West said they haven't ruled them out.
Surfers who want to check e-mails or navigate from the free sites must pay for that wireless use. (They're directed to a secure page where they're asked for their credit card number.)
Offering the service is one way of making visitors feel welcome, with the hope they'll want to return.
"We think there's an expectation that people have when they come to a community like Stratford. They expect to pull out a smart phone or tablet and expect to see content . . . we're meeting an expectation," West said.
He admitted the system isn't perfect, but noted Rhyzome is a for-profit company that does turn a profit.