Jump to content

WeBrain

Members
  • Posts

    8
  • Joined

  • Last visited

Contact Methods

  • Website URL
    http://www.foreplay.net
  • ICQ
    0

Profile Information

  • Location
    Portugal

WeBrain's Achievements

Rookie

Rookie (2/14)

  • First Post
  • Conversation Starter
  • Week One Done
  • One Month Later
  • One Year In

Recent Badges

0

Reputation

  1. Hi, im thinking of opening a resseler account but one of my clients have a big mailing list and sends about 1000 emails weekly (not spam). My current host doesnt like this (althought there was never a complaint and all mails have the legal terms and the info to be removed from mail list) and thats why im changing. Will i be ok at TCH or not? Thanks
  2. Hya 4thStar... Just comment out the following section of the code : >/*if (!isset($PHP_AUTH_USER)) { header('WWW-Authenticate: Basic realm="Site Statistics"'); header('HTTP/1.0 401 Unauthorized'); echo 'Authorization Required.'; exit; } else if (isset($PHP_AUTH_USER)) { if (($PHP_AUTH_USER != $username) || ($PHP_AUTH_PW != $password)) { header('WWW-Authenticate: Basic realm="Site Statistics"'); header('HTTP/1.0 401 Unauthorized'); echo 'Authorization Required.'; exit; } else {*/ Then password protect the stats dir using cpanel. Hope this helps
  3. Ok i solved the problem with a work around. I took the config to a safe folder, disabled authentication in index.php and password protected my stats folder in cPanel. Everything runs as i want now. I can go on vacations finally hehe Thanks for trying to help.
  4. hi again.. ok moved config.php to stats folder and edited my index.php to require_once("config.php"); It still refuses to accept my username/pass 3 times then gives me the "Authorization Required." page! My config file : ><?php /************************************************************************/ /* AWStats Access 2.0: Provides access to AWStats outside of cPanel */ /* ============================================ */ /* Created for and by members of TotalChoiceHosting.com */ /* Copyright (C) 2004 by TotalChoiceHosting.com */ /* */ /* This file is part of AWStats Access. */ /* AWStats Access is free software; you can redistribute it and/or */ /* modify it under the terms of the GNU General Public License as */ /* published by the Free Software Foundation; either version 2 of */ /* the License, or (at your option) any later version. */ /* */ /* AWStats Access is distributed in the hope that it will be useful, */ /* but WITHOUT ANY WARRANTY; without even the implied warranty of */ /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ /* GNU General Public License for more details. */ /* */ /* You should have received a copy of the GNU General Public License */ /* along with Foobar; if not, write to */ /* Free Software Foundation, Inc. */ /* 59 Temple Place, Suite 330 */ /* Boston, MA 02111-1307 USA */ /************************************************************************/ $username = "asdf"; /* used to access this utility */ $password = "asdf"; /* used to access this utility */ $site = "mysite.com"; $cpnlusername = "myCpanelUserName"; $cpnlpassword = "********"; ?> My index file ><?php /************************************************************************/ /* AWStats Access 2.0: Provides access to AWStats outside of cPanel */ /* ============================================ */ /* Created for and by members of TotalChoiceHosting.com */ /* Copyright (C) 2004 by TotalChoiceHosting.com */ /* */ /* This file is part of AWStats Access. */ /* AWStats Access is free software; you can redistribute it and/or */ /* modify it under the terms of the GNU General Public License as */ /* published by the Free Software Foundation; either version 2 of */ /* the License, or (at your option) any later version. */ /* */ /* AWStats Access is distributed in the hope that it will be useful, */ /* but WITHOUT ANY WARRANTY; without even the implied warranty of */ /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ /* GNU General Public License for more details. */ /* */ /* You should have received a copy of the GNU General Public License */ /* along with Foobar; if not, write to */ /* Free Software Foundation, Inc. */ /* 59 Temple Place, Suite 330 */ /* Boston, MA 02111-1307 USA */ /************************************************************************/ require_once("config.php"); if (!isset($PHP_AUTH_USER)) { header('WWW-Authenticate: Basic realm="Site Statistics"'); header('HTTP/1.0 401 Unauthorized'); echo 'Authorization Required.'; exit; } else if (isset($PHP_AUTH_USER)) { if (($PHP_AUTH_USER != $username) || ($PHP_AUTH_PW != $password)) { header('WWW-Authenticate: Basic realm="Site Statistics"'); header('HTTP/1.0 401 Unauthorized'); echo 'Authorization Required.'; exit; } else { if($QUERY_STRING == ""){$query = "config=$site";}else{$query=$QUERY_STRING;}; $Previous = false; if(isset($_POST)) { foreach($_POST as $key => $value) { if($Previous) { $POSTED .= "&"; } $POSTED = "$key=$value"; $Previous = true; } } $Curl = curl_init("http://$cpnlusername:$cpnlpassword@$site:2082/awstats.pl?$query"); if(isset($_POST)) { curl_setopt($Curl, CURLOPT_POST, TRUE); curl_setopt($Curl, CURLOPT_POSTFIELDS, $POSTED); } curl_setopt($Curl, CURLOPT_RETURNTRANSFER, 1); $results = curl_exec($Curl); for ($i = 0; $i < count($return_message_array); $i++) { $results = $results.$return_message_array[$i]; } if($query == "config=$site"){$results = str_replace("src=\"", "src=\"?", $results);} if($framename==index){$results = str_replace("src=\"", "src=\"index.php?", $results);} $results = str_replace("action=\"", "action=\"index.php?", $results); $results = str_replace("href=\"", "href=\"?", $results); $results = str_replace("href=\"?http://", "href=\"http://", $results); $results = str_replace("awstats.pl?", "", $results); echo $results; } } ?> It Should work as i cant see anything wrong there
  5. Hi David I did it already in the index.php : "require_once('/home/myusername/safe/config.php');" I dont know whats going wrong... More ideas/guesses are appreciated Thanks
  6. another thing that works is to put email in swf and not on a image. just do a button in flash and your done.
  7. Hi everyone. 1st of all congrats and thanks for this script. My problem is that the prompt does not accept my user and/or password. After 3 trys i get "Authorization Required." If i modify the index.php so it does not require authorization everything works fine. My config file is in the "safe" dir outside public_html. I double checked my config for typos in user/pass. Any thoughts? Thank you
×
×
  • Create New...