• Welcome to Valhalla Legends Archive.
 
Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - Ersan

#1
No, I mean server-side sessions http://www.php.net/session
#2
Make a long random salt string for each user and store it in the database, then store the password as md5($salt . $password) or sha1($salt . $password . $salt) or hash('sha256', $salt . $password . $salt . $password . $password . $salt . $password) or whatever your peace of mind permits and use sessions.
#3
function GetSettings($id, $settings)
{
  $ids = mysql_query("SELECT * FROM Accounts WHERE id = '$id'");
  if (mysql_num_rows($ids) != 1)
  {
   return "noacc";
  }
  else
  {
   foreach($settings as $setting)
   {
    $results[] = mysql_result($ids, 0, strtolower($setting));
   }
   return $results;
  }
}
#4
Ok so storing your passwords without a salt in the database is stupid move #1, not adequately protecting passwords stored in cookies is stupid move #2.  I doubt many people will care to steal your users passwords but you should do it the right way for experience...
#5
Nope, php is typeless
#6
This is idiotic, XOR crypting is totally unnecessary and the routines for it are far slower than md5 or sha1, also the userid and '00' is an insufficient salt as rainbow tables are compiled with numbers as well as letters...
#7
Dude you really should learn how mysql works, use the function I posted instead of yours, and if you ever want to get the number of rows w/o doing anything else with that data use SELECT COUNT(*) FROM Accounts WHERE id = '$id' (but again you shouldn't be doing that).
#8
Your SaveSetting function sucks, something like this will do what you want:

function SaveSettings($settings, $acct) {
// Do whatever you do to make sure the "acct" is valid here...
foreach($settings as $key => $value) {
mysql_query("UPDATE settings SET $key = $value WHERE account = $acct") or die("Error saving setting '$key'");
}
print("Settings saved.");
}


calling:

$settings['email'] = "[email protected]";
$settings['lamer'] = "yes";
SaveSettings($settings, $acct);


But honestly you should be trying to save them all in the same query, and account exists should definitely be done seperately...  Otherwise you're dishing out unnecessary overhead.  I'm also guessing on your database structure but that's what a sane person would use...
#9
Your time would be better spent on the problem in general, not how it affects JBLS...
#10
Web Development / Re: [PHP] Question
April 10, 2007, 03:17 PM
Hey joe, you dumbfuck, they haven't used magic bytes since 1996, and there's sure as fuck no magic bytes in torrent files, and no traffic shaper in the history of the world has ever shaped based on "magic bytes" as that's just completely fucking retarded - learn your shit before you make idiotic and irrelevant comments.  I'm pretty sure everyone who knows anything about the actual problem disregarded your dumbass post because of how stupid it was, and consequentially I fucking guarantee you arta wasn't responding to your idiocy.  Arta might be wrong but you take the dumbass award.  For the love of God take your self-righteous whiney jesus-boy shit elsewhere.

Thanks, Someone who isn't a complete and utter moron.
#11
General Programming / Re: Help with ftp
April 08, 2007, 12:05 AM
It's also totally irrelevant because battle.net's "ftp server" is nothing like a real ftp server.

Also, ban nesucks...
#12
Besides me?
#13
Try using search before asking dumb questions...
#14
Web Development / Re: [PHP] Question
March 30, 2007, 07:40 PM
If you knew how torrent files work, you'd know that they can be as big as hundreds of megabytes depending on the piece size and size of files they have hashed...  Tracker addresses barely take up any space.
#15
Web Development / Re: [PHP] Question
March 30, 2007, 02:48 PM
Who the fuck said the file was 4kb...

100kb versus 137kb is alot in a high traffic situation, plus the unnecessary overhead in cpu time...  Besides the fact that it wouldn't solve the problem in any way whatsoever because Arta has no clue how mime encapsulation or traffic shapers work (and consequentially, web servers and browsers in general), it was a stupid idea.

'Checking' the mime type on his end doesn't do anything, it needs to be changed...