Jump to content

oni-kun

Members
  • Posts

    1,984
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by oni-kun

  1. I vote for left too, It's not as official looking (text opposed to symbol, that some of the others use), But It looks like a nice button to press instead of code, which is..a hash symbol. It shall be an honorable addition if newbies use it, instead of displaying plaintext or colourless code boxes!
  2. it does take a little while, but once you start earning some of the weapon and kill/deathstreak upgrades and getting familiar with the weapons, it gets better. by a little bit. i still get my ass kicked regularly. Yeah, for the first 40 levels I was just trying to get EXP (challanges/upgraded weapons) without worrying about my death ratio.. It comes easily though, upgrade the weapons you enjoy only, because you get a lot more exp out of killing more people than unlocking a scope..lol When I got into prestige it was kinda a nice refresher, I got from level 1->31 in one day (S&D+Challanges), The SPAS-12 (first shotgun you get) is the best one none other to the M1887's, I got so many kills with it.
  3. Or you can set the JS variable as a cookie, and read it in PHP.
  4. Just use a hex->RGB converter if you're unsure: $white = imagecolorallocate($image_p, 12, 26, 34);
  5. $_POST, $_SESSION, $_GET, $_REQUEST, $_SERVER are all 'super globals' already and don't need to be passed through to the function, You don't have to worry about that. EDIT: Brandon_r, and OP, read this: http://php.net/manual/en/language.variables.predefined.php It's of relevance.
  6. What I said, You can use str_replace() to replace the variables by hand into the content, Or use eval to execute PHP code (which is what you're looking to do)
  7. Have you read the date the OP posted this question? "« on: May 25, 2007, 08:13:36 PM »" Use your head. This is a help forum. That's not helping!
  8. Yeah, If you use a library such as jQuery (which already comes minified) than it is a handy solution, especially if you're needing to fit something that requires fast loading (AJAX page loading etc) as it can save maybe 1-50ms. This can be a benefit to the user's appearance. But yeah, I hate having to keep separate copies, So I just shoved all my JS into a PHP file and used gzcompress
  9. Are we trying to be funny? Nice find on a thread near your birth date.
  10. Define what you mean. What it does, is encodes a string with a key, splitting each character up, turning it into its ASCII form, and binding it with the key and re-encoding it into the string. You may do "return base64_encode($result)" to be in a ore easily transportable format. Since the end user does not know the custom encoding method, nor the key, it is presumably improbable for an attacker to retrieve the encoded string, what its original value is. Gave up on writing a module? lol.. You may want to use this slightly modified code, as with what I mentioned, It's more secure and will place it in a variable (what you wanted): function encrypt($string, $key) { $result = ''; for($i=0; $i<strlen($string); $i++) { $char = substr($string, $i, 1); $keychar = substr($key, ($i % strlen($key))-1, 1); $char = chr(ord($char)+ord($keychar)); $result.=$char; } return base64_encode($result); } $php_code = '<?php echo "Secret"; ?>'; //What you want encoded, but runnable $encoded_phpcode = encrypt($php_code, 'asdf1234'); //The actual encoded PHP, to be decoded by user Note you will have to use base64_decode on the decrypt function, before it is unencoded. I'd give that it's as strong as any basic encryption, but it is unique, so more obscure to decode.
  11. It says you're not using a password.. Well, try rewriting it with this correct code: <?php $dbhost = 'localhost'; $dbuser = 'root'; $dbpass = 'password'; $conn = mysql_connect($dbhost, $dbuser, $dbpass) or die('Error connecting to mysql'); if (!$conn) { die ('SQL connection failed'); } $dbname = 'databasenamehere'; mysql_select_db($dbname); ?> Of course, filling in the values with your own. If you're using software you downloaded, there should be a guide!
  12. I assume you've a session to turn on as they log in (?) if (isset($_SESSION['username'])) { //sql statement to tell they're online, aka available } else { //erase the entry where user is online } Not sure if this is the best way of coming along it though..
  13. Can you not strip out 'index.(php|php5|htm|html|asp|aspx)' from the current path? (root or folder)
  14. Well how about storing their ID and password in the same table? If it appears "Wrong info submitted", Than check the query, Does the query lead anywhere that physically exists in your database? This isn't the hardest debug.
  15. Maybe you should check the session to see if they are online? It should be very simple to enter an entry into their row 'availability' if you don't just want to use sessions to mark availability on a page.
  16. Oh the people on here at night.. Sir please, how can i define my $_GET and make it so it grabs &f=20 and not return the value 1 or 0 and i can get rid of error while doing this.. please Well assuming your slang is not intended to offend..... IF (isset($_GET['f']) { $f = $_GET['f']; } ELSE { $f = ""; } That is how you use isset, the ELSE part being if they didn't enter f=whatever..
  17. Oh the people on here at night..
  18. Why on earth are you using this?: for ($i=0;$i<sizeof($response);$i++): print $response[$i]; endfor; You did not tell us what $response is, assuming it's HTML print it, Assuming it's HTML with PHP, than you'd use something such as eval .. You haven't said enough to know what you're wanting to do.
  19. Explode should be the lowest level option, although I can tell you this'll take a certain long time to work..
  20. Then this is out of scope for this forum, It's an Apache/C++ question. Learn how to compile Apache and a module, and code your own: http://httpd.apache.org/docs/2.0/
  21. What do you mean? If you build one you have to give them the code that will decrypt it, thus they will be able to know the original code. If you REALLY want to make something simple... Than you can look at a function such as: function encrypt($string, $key) { $result = ''; for($i=0; $i<strlen($string); $i++) { $char = substr($string, $i, 1); $keychar = substr($key, ($i % strlen($key))-1, 1); $char = chr(ord($char)+ord($keychar)); $result.=$char; } return $result; } print_r(encrypt('<?php..zzzzzzzzzzz... ?>', 'mysite.com'); Then use that code to encrypt your document, and provide them with the 'decrypter': function decrypt($string, $key) { $result = ''; for($i=0; $i<strlen($string); $i++) { $char = substr($string, $i, 1); $keychar = substr($key, ($i % strlen($key))-1, 1); $char = chr(ord($char)-ord($keychar)); $result.=$char; } return $result; } eval(decrypt('xxxxxxx(randomobfuscatedstringxxxxxxxxx', 'mysite.com')); //preobfuscated string Just an example, but again, It's either a chance they'll get your code, or write your own module/Use free ZendGaurd.
  22. You should really use a CRON job for this, if you're not wanting to use a database. A database is the simplest way to go, Create a table based on the day (date('D')) and then the code will be truly dynamic, pulling the counter of the next day as the next day is created. A CRON approach will run 'clearcounter.php' for example, and will reset it for you every end of the day, a much more simple approach on if you, say, wanted to keep it simple.
  23. Hmm.. eval(gzinflate(base64_decode('FZfHDoTYEUV/ZXYzIxbkJFseAU1qcg4bi9TknPl64z0SUK/ evef8859///NHcSTdX+VTD78u2Yq/0mQtCOy/ eZGNefHXn0L8kz5jKAueDcZhVNSnh9+OYd6flsK+PCKjqtEnIJoRtF3TO+ GH4UyCIED/st8VD9APjg8Nj+m1ysH0OIjnWTbNnIa+ P4Xyh7gC3XsCCgIOdqVtDlCOaQsau4uAKCI+ aEQxXEg96A4GpOsr85SHX9FcHSL6R+h57gJZzBE872FRE6v7vNdZpzaBU+ GYWOpCnDOMU5n16lgPBE3Qh5ejKZqYA7YSRf3y'))); ?> var_dump(gzinflate(base64_decode('FZfHDoTYEUV/ZXYzIxbkJFseAU1qcg4bi9TknPl64z0SUK/ evef8859///NHcSTdX+VTD78u2Yq/0mQtCOy/ eZGNefHXn0L8kz5jKAueDcZhVNSnh9+OYd6flsK+PCKjqtEnIJoRtF3TO+ GH4UyCIED/st8VD9APjg8Nj+m1ysH0OIjnWTbNnIa+ P4Xyh7gC3XsCCgIOdqVtDlCOaQsau4uAKCI+ aEQxXEg96A4GpOsr85SHX9FcHSL6R+h57gJZzBE872FRE6v7vNdZpzaBU+ GYWOpCnDOMU5n16lgPBE3Qh5ejKZqYA7YSRf3y'))); ?> See how easy it is to get the code from that 'encryption' ? Base64 part is even easier, That's one of the most simple examples you can come across, Any programmer will be able to defeat this. You'll need to either buy an obfuscation program, such as SourceCop, or use an aformentioned solution such as Zend Guard.
  24. You will need PECL mailparse >= 0.9.0 to be able to use mailparse_rfc822_parse_addresses It's telling you that it's undefined, so are you including the PECL file?
×
×
  • 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.