Permalink
Browse files

fixed host - now actually uses your watched site (['site']) as the host

  • Loading branch information...
1 parent 5cba6d0 commit d74ac9f77446eca48ad42b4235659edccb63cc68 @dkuntz2 dkuntz2 committed Dec 11, 2011
Showing with 3 additions and 2 deletions.
  1. +1 −1 install.php
  2. +2 −1 record.php
View
2 install.php
@@ -286,7 +286,7 @@
<div class=\"full\">
<label for=\"config_site\">What site is Grapefruit watching?</label><br />
- <input type=\"text\" name=\"config_site\" value=\"" . substr(str_replace("http://", "", str_replace("www.", "", $grape_loc)), 0, strpos(str_replace("http://", "", str_replace("www.", "", $grape_loc)), "/")) . "\" />
+ <input type=\"text\" name=\"config_site\" value=\"" . substr($grape_loc, -1) . "\" />
</div>
<div class=\"full\">
View
3 record.php
@@ -6,7 +6,8 @@
$record['ip'] = $_SERVER['REMOTE_ADDR']; //getenv("REMOTE_ADDR"); getenv("HTTP_CLIENT_IP"); getenv("HTTP_X_FORWARDED_FOR"); http://www.4webhelp.net/scripts/php/ip.php
$record['js_referrer'] = $_SERVER['HTTP_REFERER']; // Referrer to this page. It should be the javascript page. Note: referrer may still be spoofed.
-$record['host'] = $_SERVER['HTTP_HOST'];
+//$record['host'] = $_SERVER['HTTP_HOST'];
+$record['host'] = $cms['site'];
$record['agent'] = $_SERVER['HTTP_USER_AGENT'];
// Variables caught from javascript have been encodeURI.
// (There's a slight difference between the PHP and javascript decode/encode functions, but this is good enough.)

0 comments on commit d74ac9f

Please sign in to comment.