Jump to content
MakeWebGames

PHP Scene

Members
  • Posts

    19
  • Joined

  • Last visited

    Never

Everything posted by PHP Scene

  1. Re: The technicalities of being a host! It's very easy to setup a web host, the problem is getting customers, and having a big budget of advertising, etc..getting clients, though in a personal option, the hosting market to wayyyy to saturated. You'll need: - dedicated server or, a vps (if you want to start small) - billing script, prefabably WHMCS - most customers prefer cPanel, therefore that is pretty much a must - money, you'll lose money at first, paying for the server, hosting script etc you won't make instant money, you'll most probably have to give it a while until you start making good money, also keep in mind, alot of people won't trust a "start up host" - Live/phone support (possible either yourself, or hire someone) Most probably more stuff to consider, but they are the basic requirements.
  2. Re: [any]Contact us   that you claimed it as your own, and did not give credits to the real author.
  3. Re: [any]Contact us http://forum.majidonline.com/archive/in ... 05181.html (random code snippet placed into google se) Little strange, that the code posted are pretty much the same? :-o
  4. Re: GRPG Forum   wtf gives you the right to say that, retard? he was asking a question, this is not just a "mccode" site, it's for all game engines, thats why he mosted in the "Game support" section.
  5. Re: Admin Content Manager mod I'd love to either see a demo/screenshots this this, sounds interesting.
  6. Re: installer question You can if you want, just run the URL "installer.php?code=config" which will take you to the config part, setup a new database, fill out the details, and your ready to go.
  7. Re: forum error If your using v1, change $db-> to mysql_ if your using v2, add: global $db;
  8. Re: id 1 and 2 Something like this? :   $user_ids = array(1, 2); // the ids if(in_array($userid, $user_ids) && $_GET['activate']){ // code here }
  9. Re: High-Low game, need a lil help please.   True, though i use the MySQL class to it's full extent (logging errors, etc), so i prefer to pass all queries through the class.
  10. Re: High-Low game, need a lil help please. If you're using v1, change it to:   mysql_query("UPDATE users SET money=$lose WHERE userid=$userid", $c);   if you're using v1, change to:   global $db; $db->query("UPDATE users SET money=$lose WHERE userid=$userid", $c);
  11. Re: please help   Whats the difference from the other one posted? lol btw..you should sanitize the $_POST. values with mysql_real_escape_string(). To the OP, you could try this:   <?php /* Mccode V1, authenticate.php recode by PHP Scene. */ session_start(); include ('mysql.php'); $username = mysql_real_escape_string($_POST['username']); $password = mysql_real_escape_string($_POST['password']); if ($username == '' || $password == ''){ exit('Please make sure you fill the username and password fields in. [url="login.php"]Back[/url]'); } $check = mysql_query("SELECT `userid` FROM `users` WHERE `login_name` = '{$username}' AND `userpass` = md5('$password') LIMIT 1;", $c) or die(mysql_error()); if(!mysql_num_rows($check)){ exit('Account cannot be found with that username and password.'); }else{ $_SESSION['loggedin'] = 1; $user = mysql_fetch_object($check); $_SESSION['userid'] = $user->userid; header('Location: index.php'); } ?>   (recode from scratch)
  12. Re: [MMCODES V2] HACKING ATTEMPTS LOGGED Here, built a small logging modication, sends an event to the admin with the ID 1 change it if you wish, any suggestions or issues you face post it here. Run query: CREATE TABLE IF NOT EXISTS `mysql_errors` ( `ID` int(11) NOT NULL auto_increment, `me_userid` int(11) NOT NULL, `error_msg` text NOT NULL, `query_was` text NOT NULL, `file` varchar(100) NOT NULL, `error_time` int(11) NOT NULL, PRIMARY KEY (`ID`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=0 ;   Open: class/class_db_mysql.php Find: function query_error() { die("[b]QUERY ERROR:[/b] ".mysql_error()." Query was {$this->last_query}"); }   Replace with: function query_error(){ global $userid; $file = $_SERVER['SCRIPT_NAME']; if(!isset($_SESSION['error_event_sent'][$file])){ mysql_query("INSERT INTO `mysql_errors` (`me_userid`, `error_msg`, `query_was`, `file`, `error_time`) VALUES('$userid', '".mysql_real_escape_string(mysql_error())."', '{$this->last_query}', '{$file}', unix_timestamp())") or die(mysql_error()); event_add(1, 'MySQL error logged, please check mysql_errors table in the database for more information.'); $_SESSION['error_event_sent'][$file] = true; } exit('Error processing request, error has been logged.'); }   thanks.
  13. Re: (not working) Auto Multi IP Check Little bored right now, so just put this together:   <?php /* Coded by Danny [php Scene] Mccode version 2.0 */ include ('globals.php'); // Insert user_level IDs here, e.g 2 = admin. $userlevels = array(2, 3); // Deny file access to players, only admins and secretaries. if(!in_array($ir['user_level'], $userlevels)){ exit('Go away.'); } $query = mysql_query("SELECT `userid`, `username`, `lastip` FROM `users`"); echo ' <h2>Duplicate IP Checker</h2> <table>'; while($data = mysql_fetch_object($query)){ $select_dup = mysql_query("SELECT `userid`, `username`, `lastip` FROM `users` WHERE `lastip` = '{$data->lastip}' AND `userid` != '{$data->userid}'"); if(mysql_num_rows($select_dup)){ $dup_data = mysql_fetch_object($select_dup); echo '<tr> <td>[url="viewuser.php?u='.$dup_data->userid.'"]'.$dup_data->username.'[/url] ['.$dup_data->lastip.'] same IP as [url="viewuser.php?u='.$data->userid.'"]'.$data->username.'[/url] ['.$data->lastip.']</td> </tr>'; } } echo '</table>'; $h->endpage(); ?>   I suppose it could be a little better optimized, yet it does the job of selecting out users with the same ip.
  14. Re: Error with coding need help please Have you modified the events table? or modified the add_event() function?
  15. Re: [MMCODES V2] HACKING ATTEMPTS LOGGED If you're using v2, a good idea is to log MySQL errors via the database (simple modifications to the database class file), therefore you could fix bugs and catch people trying to modify queries to perform SQL injection (just an idea).
  16. Re: text color mod problem   {$r['color']} should be: {$ir['color']}   Remember, the $ir array variable contains the fetched information from users table (of the user) in this case, 'color'.
×
×
  • Create New...