Jump to content

.josh

Staff Alumni
  • Posts

    14,780
  • Joined

  • Last visited

  • Days Won

    43

Everything posted by .josh

  1. haha yah I already have that on my list, lookin' forward to see what everybody is screamin' about on that count.
  2. I had a 2 year contract with T-Mobile and it ended sometime around October of last year. Since then I switched to month-by-month payment. Never once had a late payment or nothin'. And it's been one thing after another with T-Mobile. On a good day it was being disgruntled about being limited about what I can and can't put on xyz phone cuz of them (I've had several phones during the course of my tenure with T-Mobile). And I've been sticking with T-Mobile just cuz I know people have complaints, regardless of carrier; like I told Phil, seems like all of the carriers are out to fuck you...just a matter of how big their dick is and whether or not they will at least give you the courtesy of lubing you up first. But this shit is where I draw the line. Yeah, I can call and bitch and maybe get a free credit or two, and I've done it before. But fuck this noise. I don't want to have to keep bitching and having some stupid shiny waved in front of my face to shut me up. I'd rather get some decent, solid service in the first place, even if it costs me more. The extra hassle and b.s. isn't worth the money I'm supposedly saving. I'm through with T-Mobile. Last night I signed up with Sprint, and cancelled my service with T-Mobile. On that note, I'm getting a htc evo shift in the mail in a couple of days, my first Android phone ever. I'm open for recommendations on some good apps!
  3. Yes this is true. If someone wants to specifically analyze a form and find which fields to avoid etc.. then sure, it is easy to handcode a spambot to get around that stuff. But that kind of defeats the purpose of having a bot in the first place. People who try and spam generally avoid trying to have to program bots for individual forms. Doing those things once will go a long way in reducing spam from bots that try to parse generic or "standard" forms. Changing your "rules" up on a fairly regular basis will make it go even further. But there is no 100% solution no matter what you do.
  4. Captchas are annoying and bad for UX, and you should avoid it unless you absolutely must use it. Instead, look into using a honeypot and/or token/time system instead. They are passive and do not require the user to jump through any hoops, and are very effective. I'm sure you know how to google, but to summarize: honeypot : basically you add a field to your form but use css to hide it from the user. A bot doesn't know it's hidden so it fills it out. In your validation script, you then check if it was filled out. If it was, then count as spam and discard. token system: Basically you generate a unique id and save it in a session var and also output it as a hidden field value in your form. When user submits form, check for the id and if it matches the session value. If it doesn't, count as spam and discard. time system: Output a timestamp to hidden field in form (better if you encrypt it). When form is submitted, compare hidden value to current timestamp. If it is something ridiculously low like < 1s then count as spam, discard. But you can go even higher, depending on how long you think it should take the average user to fill out the form. This is not an exact science and not 100%, as a bot can simply time itself out to get around it. But most bots don't, and even if they do, it's still effective, combined with the above methods (you can even combine this with the token system).
  5. Why on earth would you want to refer to something like that? Surely there is a much easier way to target it than that...but can't really say one way or the other w/out some code showing the context.
  6. This is not a problem with your browser(s), it's a problem with your server and parsing php. Check to make sure the file's mime-type(s) are setup to properly parse php.
  7. all by itself, that works fine for me (even in Chrome). What else do you have on your page? I don't think that error has to do with this code. For one thing, I do not see "string" anywhere in that code, and the error is telling you that you are trying to make a call to a function called "string" and it doesn't exist.
  8. You need to make an AJAX call to your php script. Lots of AJAX tutorials out there.
  9. Yeah, no native trim method...I find that odd.
  10. In general I don't like cell phones. I resisted getting one for so long, up until I started this job about 2 years ago, because I more or less need one for it. Technically I only *need* voice service, but having data service to have access to email has been really convenient. So yeah...if I didn't have a job that pretty much required it, I would continue to not have a cell phone. And fuck all that "in case of emergency" b.s. I grew up without cell phones and shit happened and I got through it just fine. People need to stop with the "in case of emergency" excuse they use for literally everything these days.
  11. It boils down to them telling me they were gonna keep charging me for a service I wasn't getting. I know all carriers out there are "shady" in that they try to confuse you and shit, but to straight up charge you for something you aren't getting...IMO that's criminal.
  12. The dot in .*? by default will only match up to to end of line char (\n), So unless your opening b tag happens to be on the last line, your pattern won't work. You need to use the s modifier to get it to also match \n so it will match to the end of the content. http://php.net/manual/en/reference.pcre.pattern.modifiers.php
  13. location.href = location.href + "#foobar";
  14. well it has since been determined that you're performing a check on the md5 hash, and md5 hashes are case-sensitive. So you will need to do a strtolower on your md5 hash since it is uppercased in your db for some reason, but ideally, you should be changing your script that uppercases it to begin with, before it goes into the db.
  15. The previous sidekick LX (2009), not the new 4G one. In case you aren't aware, data services for that phone ends today. And in case you are wondering why T-Mobile has done little to tell you about it, it's because they intend to keep on charging you for it until you tell them to stop, even though you won't be getting the service. Here is a rant I made about my personal ordeal with T-Mobile's online agent (including the actual transcript). http://crayonviolent.com/shady_tmobile_is_shady.html
  16. This topic has been moved to PHP Coding Help. http://www.phpfreaks.com/forums/index.php?topic=334670.0
  17. okay, so it looks like your courses.xml file is mal-formed. You need to make sure the xml file is properly formatted.
  18. one thing to note though is that case-sensitive passwords are stronger, so ideally you should be matching up how you generate/store them, and making the check case-sensitive. For example, treating all of these as the same thing makes for less work in trying to crack a password: aaa aaA aAa aAA Aaa AaA AAa AAA
  19. in any case, the case-insensitive version of strcmp is strcasecmp
  20. You are supposed to pass the $dbname value to the function, when you call the function.
  21. okay well you should be doing something more like do{} while ($num_rows > 0); Because you want to keep trying to generate a new number while the generated number is found. But anyways, looking at your original code...you prefix this string with a microtime timestamp, followed by a random string. I don't know what you are actually using these random strings for, but with the way you are generating it, the chances of generating a duplicate string are so small that IMO it's not even worth checking. I mean seriously, two people would have to submit it at the exact same microtime level moment in time, server would have to process both requests at the exact same moment in time, and by some miracle, follow up by generating the exact same random string that's appended to the microtime. The only way that could even begin to have a 1.e-100000000 or some shit chance to actually happen would be if you have massive amounts of people constantly executing this script and then maybe MAYBE it might eventually happen. But if you are actually operating under those conditions, this loop that checks for existing string isn't going to really work anyways, because it would be equally conceivable that the string could be duped between check and insert. So you would have to at a minimum lock your table while performing the check and insert, so that no other values can be inserted. This is going to slow things down, esp if you are really expecting lots of hits like that. Basically what I'm trying to say is that with the way you are generating the string, I wouldn't even worry about checking if it's been duped. Especially depending on what these values are actually being used for... edit: hmm...well, I guess I didn't fully look at your code. Seems like you start out by prefixing with microtime, but then do stuff after that that takes the main use for it out of the picture. Is there a reason you can't make this "random string" keep the full microtime prefix?
  22. This topic has been moved to MySQL Help. http://www.phpfreaks.com/forums/index.php?topic=334572.0
  23. php doesn't just stop running or "breaking" as you say, without a reason (without an error). If it is because of an error, you must have error reporting turned off in php.ini or .htaccess or somewhere. edit: also, are you sure that 3rd line of code is even returning anything?
  24. as-is, that code you just posted works just fine. I see your "mmm...I love cookies! *munch munch munch*" echoing just once, followed by your "test test".
  25. Wouldn't it be funny if she uses your picture as her avatar on websites? I bet someone would make a movie out of that.
×
×
  • 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.