Jump to content

Lumio

Members
  • Posts

    679
  • Joined

  • Last visited

    Never

Everything posted by Lumio

  1. <?php $val = 'foo'; //Defining $val $arr = array(); //Defining $arr as array $arr['key'] = $val; ?>
  2. Maybe it's because of mod-rewrite or because of the file itself or maybe the file does not exist.
  3. Create a .htaccess File with the following content: ErrorDocument 404 "/missing.php" And then look into $_SERVER
  4. Try utf8_encode($str) (or was it utf8_decode?)
  5. Man, you are the best! Greetings
  6. Hi, I wrote a little class, which should help at least me or other webdevelopers to prevent spam in guestbooks and comments. Sounds great but I hope it is. So at first the link to download: http://projects.citrosaft.com/floodassassin How does it work? You have to set up a mysql-database with a table where you can put your rules in. In the download-package there is already a dummy.sql with some rules included. Set up a configuration.php with the default settings of your database (for more details read the full tutorial here) and load the class and check your incomming messages. A detailed tutorial is found here. So what is the result? You get an array back with 3 parts. The first is the message level. The higher the level the higher the chance of being spam. the next part is just a detailed level-array and the last part contains the description. If the level is higher or equal 3 the message is spam and if it's higher or equal 6 I think you can ignore the message. I tested my tool and it found every spam-messages I hope you enjoy it greetings -Benjamin
  7. Hello! I have some signs here: ygabodfe And I want to check a string, if it has at least 5 of this chars and every char has to be there only once. Is that possible with Regex?
  8. Lumio

    MD5-Crypt

    Hi Lamez... thx for your post... at least one, who knows the problem with passwords... but my problem was, that I want to generate a md5 (or even blowfish) hash for the shadow-file (I don't want to change that file directly, but with usermod I think it would be ok).
  9. Lumio

    MD5-Crypt

    I think it is the same way
  10. Lumio

    MD5-Crypt

    Because I don't think that would work in the shadow-file
  11. Hi... I try to find a way to crypt a password as like the systemusers are. I tried to split the salt in to parts: $1$ and some signs for the salt ending with a $ For example: crypt('password', '$1$balK.s2A$'); Is this correct?
  12. Or rewrite it with empty values
  13. You have to send an http-query and have to wait for the result. See here
  14. I did it by my own ^(?=index)|(.+?)\.html$ That works great
  15. Hi! How can I use (.+?) but when that part is index, it shouldn't get recognized. I'm using that in a .htaccess file: RewriteRule ^(.+?).html[\/]{0,1}$ index.php?page=$1 How can I recognize if the first part is index?
  16. Hi! I think you're looking for nl2br But better to use a combination of nl2br and htmlspecialchars: echo nl2br(htmlspecialchars($content)); htmlspecialchars prevents from XSS (Cross-Site-Scripting)
  17. That's because of magic quotes. I'm using the following code to prevent of magic_quotes: <?php if (get_magic_quotes_gpc()) { //Magic Quotes enabled? $_POST = array_map('stripslashesinarray', $_POST); $_GET = array_map('stripslashesinarray', $_GET); $_COOKIE = array_map('stripslashesinarray', $_COOKIE); $_REQUEST = array_map('stripslashesinarray', $_REQUEST); } function stripslashesinarray($value) { return (is_array($value) ? array_map('stripslashesinarray', $value):stripslashes($value)); } ?> Put that code to the beginning of every PHP-page, where you need $_POST and so on.
  18. Not only CSS... learning PHP for example or reading written posts. ZWI_TSJ_uitslag seams to be a constant and so it works.
  19. no. learn it on your own. I also learned PHP with the php-manual, some books and also of boards such like this one.
  20. What is hxxp? I only know http. You can solve it with frames, what you want.
  21. When you using an array in "" you have to write "{$array['index']}". But I won't use that in this way. Better to output HTML as HTML and not with PHP: <table> <tr> <td><?php echo time(); ?></td> </tr> </table>
  22. Omg sorry... I already knew that, but I didn't see that ^^
  23. array(kipp@gmail.com,0,5-13,69.232.189.155,mista@gmail.com,0,5-13,69.232.189.155) Strings always have to have quotes: array("kipp@gmail.com",0,"5-13","69.232.189.155","mista@gmail.com",0,"5-13","69.232.189.155")
  24. echo "<a href=\"".trim($this->link)."\" target=\"".trim($this->target)."\">".trim($this->title)."</a>"; Maybe you also need htmlspecialchars to avoid XSS.
×
×
  • 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.