Jump to content

oni-kun

Members
  • Posts

    1,984
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by oni-kun

  1. mysql_real_escape_string can only function if there is an open connection to a database, Although it seems you are using proper use. Why not var_dump $name and $content right after they are escaped to see what is wrong?
  2. die is an alias of exit and exits the script with a message. So: This: die ("The Code Entered Was NOT Correct. Please go Back and Re-Type it Carefully." . "(reCAPTCHA said: " . $resp->error . ")"); Can become: die ('Whatever in HTML you want here as the error message.');
  3. Wow, That's what you get for coding in C for a few hours before coming on to this forum.. Glad ya got it worked out.
  4. Why can't you display the transliterated characters, but store the original accented ones as UTF8? You'd have to do an impossible str_replace scheme which doesn't make so much sense.
  5. You can use a function (faster than iconv): EDIT: (The last 128 character turn into entities on this forum, but you may not need them, darn auto encoding eh?) <?php function removeaccent($str) { $a = array('À','Á','Â','Ã','Ä','Å','Æ','Ç','È','É','Ê','Ë','Ì','Í','Î','Ï','Ð','Ñ','Ò','Ó','Ô','Õ','Ö','Ø','Ù','Ú','Û','Ü','Ý','ß','à','á','â','ã','ä','å','æ','ç','è','é','ê','ë','ì','í','î','ï','ñ','ò','ó','ô','õ','ö','ø','ù','ú','û','ü','ý','ÿ','Ā','ā','Ă','ă','Ą','ą','Ć','ć','Ĉ','ĉ','Ċ','ċ','Č','č','Ď','ď','Đ','đ','Ē','ē','Ĕ','ĕ','Ė','ė','Ę','ę','Ě','ě','Ĝ','ĝ','Ğ','ğ','Ġ','ġ','Ģ','ģ','Ĥ','ĥ','Ħ','ħ','Ĩ','ĩ','Ī','ī','Ĭ','ĭ','Į','į','İ','ı','IJ','ij','Ĵ','ĵ','Ķ','ķ','Ĺ','ĺ','Ļ','ļ','Ľ','ľ','Ŀ','ŀ','Ł','ł','Ń','ń','Ņ','ņ','Ň','ň','ʼn','Ō','ō','Ŏ','ŏ','Ő','ő','Œ','œ','Ŕ','ŕ','Ŗ','ŗ','Ř','ř','Ś','ś','Ŝ','ŝ','Ş','ş','Š','š','Ţ','ţ','Ť','ť','Ŧ','ŧ','Ũ','ũ','Ū','ū','Ŭ','ŭ','Ů','ů','Ű','ű','Ų','ų','Ŵ','ŵ','Ŷ','ŷ','Ÿ','Ź','ź','Ż','ż','Ž','ž','ſ','ƒ','Ơ','ơ','Ư','ư','Ǎ','ǎ','Ǐ','ǐ','Ǒ','ǒ','Ǔ','ǔ','Ǖ','ǖ','Ǘ','ǘ','Ǚ','ǚ','Ǜ','ǜ','Ǻ','ǻ','Ǽ','ǽ','Ǿ','ǿ'); $b = array('A','A','A','A','A','A','AE','C','E','E','E','E','I','I','I','I','D','N','O','O','O','O','O','O','U','U','U','U','Y','s','a','a','a','a','a','a','ae','c','e','e','e','e','i','i','i','i','n','o','o','o','o','o','o','u','u','u','u','y','y','A','a','A','a','A','a','C','c','C','c','C','c','C','c','D','d','D','d','E','e','E','e','E','e','E','e','E','e','G','g','G','g','G','g','G','g','H','h','H','h','I','i','I','i','I','i','I','i','I','i','IJ','ij','J','j','K','k','L','l','L','l','L','l','L','l','l','l','N','n','N','n','N','n','n','O','o','O','o','O','o','OE','oe','R','r','R','r','R','r','S','s','S','s','S','s','S','s','T','t','T','t','T','t','U','u','U','u','U','u','U','u','U','u','U','u','W','w','Y','y','Y','Z','z','Z','z','Z','z','s','f','O','o','U','u','A','a','I','i','O','o','U','u','U','u','U','u','U','u','U','u','A','a','AE','ae','O','o'); return strreplace($a, $b, $str); } ?> Or: //Convert accents into unaccented, Note iconv is an external executable which may be sluggish compared to string replacing. $text = iconv('UTF-8', 'US-ASCII//TRANSLIT', $text);
  6. You can do: print '<b>Code was not entered correctly! Go <a href="..">Go back</a>'; Make sure quotes are not conflicting (Such as only using double quotes , if they are within singles. That is the equivalent PHP code to "print" something out to the browser. I assume that is your problem.
  7. Yeah, I can't be damned to look through all of that right now. From the look of it, the jist is just warnings. Try compiling it to not check strict static bindings and it should compile without too much trouble.
  8. If it were what the administration panel could set, It should warn the user of invalid domain address. It could just be a random factor in this server X communiating with your ISP's server Y, and something prevented the transaction. Many SMPT servers have trouble communicating in certain areas.
  9. @runnerjp. Please do read up on common security practises, The most probable cause of this is an SQL interjunction from unsecure code. If you showed us some key elements (How data is sanitized, or displayed) and if you are properly escaping the data (It seems you're double escaping) then we could help. But for now, Just disallow anyone to log in, and post here for help on your code security or take time as required to fix your script. There's no harm in making a mistake, maybe this could be a simple wakeup call to show you there are a lot of people who try these things, so it's essential to secure coding correctly.
  10. D.Shankar, Are you an idiot? You're promoting using horrible code with such incredibly obvious security flaws, All, On the magic notion that some website can prevent hacking!
  11. The one on the top right seems the most professional, I'd choose that over the others; Although a mix between #2 and #3 would look nice, #3 background looks almost "too" transparent. The first one is "too" green and the fourth seems too "dark". Best I can describe the others ones if that's what you wanted.
  12. It's all one colour really, Why not add some difference to the headers/background/sections? It's like it's all part of the same div, but spaced out left and right, It's not so appealing to look down without much difference between themselves.
  13. HEADER ERRORS - READ HERE BEFORE POSTING THEMl The extremely obvious topic always which is at the top.
  14. Would it help if I answered in this colour?
  15. How do you not know how to accomplish this? Create a column on each file row, and add views + 1. It doesn't matter what you do on that page, as long as you are outputting only image data. Just don't print anything relating to the query.
  16. Clearly you do not have the proper credentials to the said database. Why does it print the query? It would be of obvious help if you posted your actual code.
  17. As I said, Unless there were a major security flaw in your script, PHP cannot be talked to by the client, and that variable will always remain static unless the end user of the script was stupid enough to allow access to it. That is a whole other topic, as that can happen on any script in existance, if the end user is stupid enough to do it. Why not put a comment next to the variable and tell them not to change it or whatever? Simple enough.
  18. Huh? As Premiso mentioned you're best just to learn what the script you're trying to write/implement is first. If the script is simple, You'd recieve the money first from the client wishing to rent ad space, And from there the script will/SHOULD track clicking. Say "viewad.php?campain=someone&clickID=32". As for the PPC/PPM costs you can do what you wish. All it'll simply do is take out from the maximum they gave you to publish their ad, The cost per click is up to you.
  19. Most of the shared host *SQL server hosts I've worke with were not "localhost", Why not look in the FAQ's or ask your hosting support?
  20. Try changing the query line to this: $query = mysql_query("SELECT * FROM users WHERE username='$username'") or die(mysql_error()); You are not checking if the query works or not, Therefor mysql_num_rows fails as there's obviously a problem.
  21. Yeah, Although bar graphs you can see the similarity in one of my hourly charts: I mean look at (Atleast akamai's) global internet usage chart: If you looked at it on a monthly usage, It'd match the sine pattern you mentioned fairly well.
  22. Maybe you do not understand the semantics of this. No one will be labled as a spammer, As the origin server will always be yours. If I sent your e-mail address 4300 times, would you get penalized? No. The best you can do is disallow them to send recipes more than X amount of times per day/hour. Obviously flagging/disallowing keywords such as .. "Viagra, ..." to be sent will be of use. There is not much harm in any of it really. At the end of the e-mail, State it was sent using the said feature, And if you're worried about spamming add a "Do not send to this address" link at the bottom of each e-mail, It'll be morally correct if you're worried about that. As for your $body being written, How do we know what your script is set up as? We can't tell you what is wrong. But in what I can see only a major flaw in your script will allow them to put arbituary content.
×
×
  • 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.