Browse Source

[pull/beta] UA spoofing

Mitsukarenai 10 years ago
parent
commit
13da0112f2
1 changed files with 6 additions and 3 deletions
  1. 6 3
      index.php

+ 6 - 3
index.php

@@ -15,6 +15,10 @@ date_default_timezone_set('UTC');
 error_reporting(0);
 //ini_set('display_errors','1'); error_reporting(E_ALL);  // For debugging only.
 
+// FIXME : beta test UA spoofing, please report any blacklisting by PHP-fopen-unfriendly websites
+ini_set('user_agent', 'Mozilla/5.0 (X11; Linux x86_64; rv:30.0) Gecko/20121202 Firefox/30.0 (rss-bridge/0.1; +https://github.com/sebsauvage/rss-bridge)');
+// -------
+
 try{
     require_once __DIR__ . '/lib/RssBridge.php';
 
@@ -32,8 +36,7 @@ try{
                     $format = $_REQUEST['format'];
                     unset($_REQUEST['format']);
 
-                    // FIXME : necessary ?
-                    // ini_set('user_agent', 'Mozilla/5.0 (X11; Linux x86_64; rv:20.0) Gecko/20100101 Firefox/20.0');
+
 
                     $cache = Cache::create('FileCache');
 
@@ -135,4 +138,4 @@ $formats = Format::searchInformation();
         <a href="https://github.com/sebsauvage/rss-bridge">RSS-Bridge</a> alpha 0.1
     </footer>  
     </body>
-</html>
+</html>