Jump to content

premiso

Members
  • Posts

    6,951
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by premiso

  1. Another route: pathinfo with the 2nd parameter (if your version supports it) of PATHINFO_EXTENSION
  2. Well I will let you know how RC1 compares to the BETA (7022) version.
  3. Change TINYINT to INT and it should work.
  4. Do not do return $total, you should use return more or less for methods and functions. You are not using it in the way you think. Remove the return's and see if that fixes it. You also have an extra closing brace ( } ) and next time explain how it is not working. It will result in better help.
  5. base64_encode and base64_decode Or hash it up, but you need to have what the hash represents on the other end for it to work.
  6. An understatement. From what I have used of Vista, Windows 7 is far more responsive, sleeker and a ton better. Really Windows 7 is very nice. If you liked Vista, I think you will love Windows 7
  7. One way someone create: <?php function get_rnd_iv($iv_len) { $iv = ''; while ($iv_len-- > 0) { $iv .= chr(mt_rand() & 0xff); } return $iv; } function md5_encrypt($plain_text, $password, $iv_len = 16) { $plain_text .= "\x13"; $n = strlen($plain_text); if ($n % 16) $plain_text .= str_repeat("\0", 16 - ($n % 16)); $i = 0; $enc_text = get_rnd_iv($iv_len); $iv = substr($password ^ $enc_text, 0, 512); while ($i < $n) { $block = substr($plain_text, $i, 16) ^ pack('H*', md5($iv)); $enc_text .= $block; $iv = substr($block . $iv, 0, 512) ^ $password; $i += 16; } return base64_encode($enc_text); } function md5_decrypt($enc_text, $password, $iv_len = 16) { $enc_text = base64_decode($enc_text); $n = strlen($enc_text); $i = $iv_len; $plain_text = ''; $iv = substr($password ^ substr($enc_text, 0, $iv_len), 0, 512); while ($i < $n) { $block = substr($enc_text, $i, 16); $plain_text .= $block ^ pack('H*', md5($iv)); $iv = substr($block . $iv, 0, 512) ^ $password; $i += 16; } return preg_replace('/\\x13\\x00*$/', '', $plain_text); } /******************************************/ $plain_text = 'very secret string'; $password = 'very secret password'; echo "plain text is: [${plain_text}]<br />\n"; echo "password is: [${password}]<br />\n"; $enc_text = md5_encrypt($plain_text, $password); echo "encrypted text is: [${enc_text}]<br />\n"; $plain_text2 = md5_decrypt($enc_text, $password); echo "decrypted text is: [${plain_text2}]<br />\n"; ?> From http://us.php.net/manual/en/function.md5.php#43696 Both sites would need to know the $password. Notice that md5 alone just hashes a value, not encrypts it. The above versions actually do an encryption using md5. Just so you do not get confused.
  8. Without the relevant code we can provide no assistance. Good luck!
  9. Didn't know RC1 was out on torrents Time to re-install Windows 7 Hopefully the minor annoyances I found are fixed, we shall see.
  10. Just an update on the Windows 7 RC: Just 9 more days till public availability. Woohoo! Cannot wait.
  11. lol, I have plenty of uses for it And for the $20 it cost me for this 8GB jumpdrive, I could see no better use for it!
  12. Do you not understand what I did to fix that issue? I mean come on now... $result = mysql_query("update characters SET positionX = 16237, positionY = 16396, positionZ = 60, mapId = 1, zoneId = 0, deathstate = 0 WHERE name = '".$character."'") or die(mysql_error()); $numrows = mysql_num_rows($result); I would hope that you are able to fix the others yourself, given that all I did was remove the semicolon before the or die statement.
  13. { $result = mysql_query("SELECT acct FROM accounts WHERE login = '".$account."' AND password = '".$password."'") or die(mysql_error()); $numrows = mysql_num_rows($result); }
  14. Install Windows Vista, Windows XP and Windows 7 from a USB Jumpdrive There is the tutorial for anyone who cares
  15. <?php $email_to = "...........@.....................co.uk"; $name = $_POST["name"]; $email_from = $_POST["email"]; $message = $_POST["message"]; $email_subject = "Feedback from website"; $headers = "From: $email_from \r\n"; $headers .= "Reply-To: $email_from \r\n"; $message = "Name: ". $name . "\r\nMessage: " . $message; // ini_set("sendmail_from", $email_from); // not sure if this is needed, but I do not think so (unless your host says different). $sent = mail($email_to, $email_subject, $message, $headers, "-f" .$email_from); if ($sent) { header("Location: http://www..................................co.uk/thankyou.html"); }else { echo "There has been an error sending your comments. Please try later."; } ?> For the headers (if on linux) you need to use \r\n Give that a try and see what comes of it. Also, the email being sent to may be the issue, as Yahoo, Hotmail and AOL block most mail coming from php servers if the server ip does not have a mail MX record, so that could be your problem.
  16. My situation was I have an 8GB Jump Drive. I wanted Windows XP, Vista and (for testing reasons) Windows 7 to be able to be installed from it. All in one, no CD's/DVD's required. Installing Windows PE 2.0 to a Jumpdrive and make it bootable is really easily done in Vista, however in XP it is a different story, since Diskpart under XP does not mount Removable Storage Drives. So that part does not work. You have to "hack" it to work by using the HP Boot Utility and Bootsect. Once that is done you copy the WinPE 2.0 iso files to the jumpdrive then make a new folder on the JD for the different windows version files. Then reboot load into WinPE 2.0 and mount the jumpdrive, navigate to the OS and run setup.exe. From there it is as simple as the CD The hard part was figuring out how to get the Jumpdrive to boot using Windows XP and not Vista.
  17. No one is going to code this for you. If you do not know how to do a simple search I would suggest reading some tutorials. http://www.designplace.org/scripts.php?page=1&c_id=25 There is one I found that might help from a google of PHP MySQL Search. Following those guides will help you. If you want this just "done" for you, say the word and I will move this post to the freelance section. The Help forum is to "help" a user not code their script for them.
  18. <?php $string = "This will retrieve the password \n Password: passworddd\n is that ok?"; preg_match("~Password: (.*+)~", $string, $password); $password = $password[1]; echo $password; ?> A few items. This will only work if the password: is on it's own line. If it is not it will not work. The . quantifier (if that is the term) matches to the end of a line. So if it is not on it's own line you need to do some other regex (maybe match to the first space). Either hope that helps.
  19. Yea, if I had to go through that just to do ` I would not use it either lol! But my keyboard = 1 keystroke.
  20. That works and all. But I do simply because it does not harm anything, if something changes in MySQL in the future your SQL should still work and it takes an extra .05 seconds to add the backticks in and no more memory used to boot. Adding in the backticks, to me, is a simple and easy way to know that the SQL will work and not fail cause of a column name. Worth the ease of mind, in my opinion.
  21. You would need to setup a BLOB type in the MySQL DB to store the actual file in. However, I would suggest against storing the actual .swf in the database and just reference the filename from the database.
  22. Good deal, I will start writing up a tutorial for it, it really is not that hard, to be honest. My whole issue is that I refuse to use Vista, and without Vista you have to do some formatting with the HP Utility and 98se Boot Disk then modify the bootsect and boddaboom. But that part I had to gather from bits and pieces it was not in just one spot. Anyhow, I will post a link to it here when I get it written and published.
  23. Nice, Windows 7 so far seems pretty nice. Just gotta get the right video drivers now and fight few a couple of different bugs I found. But so far so good.
  24. Well, I figured it out Too bad Windows 7 is still Beta, but it works great for Vista and XP. If anyone wants a tutorial posted let me know, if not I will just keep my secrets to myself >
  25. Has anyone tried to setup WinPE2.0 to install Windows 7 or Vista from a Jumpdrive? Just curious, I highly doubt there have been I am currently working on doing it and finding it an annoying task with the right information spread over multiple sources as I am working from WindowsXP, which requires a bit more work. I am on the last stretch right now, however. And if this works I am going to attempt to setup XP and Vista to be installed the same way. That way I have all 3 in one simple jumpdrive install and it should make it easy for re-installing or setting up another computer at work instead of using CD's/DVD's. The main reason for doing this is some of the CD drives at work are not DVD capable, so yea. We do use Ghost, but in some remote locations Ghost is not acceptable. So yea. I decided to venture down this road. Anyhow just curious if I am the only tard to try this or not If I do successfully get Win7 installed from PE, I might even post how I did it.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.