Jump to content

.josh

Staff Alumni
  • Posts

    14,780
  • Joined

  • Last visited

  • Days Won

    43

Everything posted by .josh

  1. $array = array('image1.jpg','image2.jpg'); shuffle($array); echo "<img src='{$array[0]}' width = 'xx' height = 'xx' />";
  2. sorry man..."fully interactive" and "within a community" are too vague to really offer up suggestions, beyond just shooting in the dark. A shoutbox, pm system or mini-games may or may not be suitable for your "community." How should we know? Not blowing anything out of proportion, just sayin', we can't really help without more details, but at the same time it's understandable why you would not want to be more detailed.
  3. You can "include" another file with an iframe. Or if it's js code, you can use the src attribute in script tags. Or you can use ajax to grab a file's output contents.
  4. phpfreaks never had an admin named thrope. Dunno what kind of crack you're smokin'...
  5. lookup negative lookaround
  6. See that's the problem with threads like this. It boils down to "I have this really great idea that's sure to work because it's unique. So I don't want to share the idea otherwise it will get copied. But anyways, anybody have any ideas on how to improve on this idea?" Problem is that nobody can really give you any kind of help, advice, tips, ideas, or anything that's really meaningful at all, without details. Also, the whole "I'm not going to share my ideas, but I want you to share yours" philosophy has never been popular with the ladies.
  7. Well that's one way to get the PTA off your back.
  8. if (!preg_match('~\.jpe?g$~i',$file)) { // file does not end in .jpg .jpeg .JPG or .JPEG }
  9. and by 500 he means 5000.
  10. function compareStringToArray($string, $array, $ordered = true) { $string = str_replace(' ','',$string); if ($ordered == true) { if ($string == implode(',',$array)) return true; } else { $string = explode(',',$string); if (count(array_merge(array_diff($string,$array),array_diff($array,$string))) == 0) return true; } // in if..else $ordered return false; } // end compareStringToArray
  11. well it kind of depends on the format of the string and the array (multi-dim array?) you might find implode to be all you really need.
  12. mysql_insert_array() is not a predefined function. It's some random user-defined function that is missing from your code (hence the undefined function error)
  13. That's exactly how I interpreted his response, too, LOL. Lame attempt to save face. Even though Gwynne did acknowledge issues for previous versions of php, he was also quick to point out that a) they MIGHT come up, depending on how you have a million diff things setup, b) even then it is not anything to shake a stick at. So overall, lame attempt to save face.
  14. hahaha LOL damn... it would have been one thing for average Joe programmer to step in and say that but for someone from php.net to say that. ULTIMATE BURN. LOL I mean, what can you say to that? "Er...umm...shit." Open mouth, insert foot indeed! I'm not going to ostracize the article poster though. His heart is in the right place.
  15. The government.
  16. sorry man, but what you want is just not possible. At best, you can open up and alter packets being sent, but if you do that, responses will be sent to the client, not back to the server. I'm not sure that php is even capable of doing that, actually. You'd probably have to use a lower level language. But even so, this will cause the connection to break, as your server will expect responses back to know that packets were received, and visa versa from them. You can't just insert a computer as the middleman, and yet at the same time, not be the middleman. If the target computer thinks its coming from some other computer, it's going to respond to that computer, not back to your server, and your server is also going to hang, because it is expecting a response.
  17. yeah...because it's not possible that having enough money can get you off the hook for virtually everything in america.
  18. so use stripos instead. Or, if you do not have php5, use some good old fashioned regex: if(!preg_match('~wikipedia\.org~i',$string)) { $string = strtolower($string); }
  19. 1) remove the enctype from your form tag. You do not have any reason for it to be there. 2) change the form method to post. There are very few reasons on this planet why you would need to make a form's method GET. 3) since you changed your form's method to post, change all the $_GET to $_POST in your php code 4) I can't even begin to comprehend what it is you're attempting to do with that fwrite <-- link to manual. Use it. Or at least post what and how you want stuff put into your text file.
  20. You could run the script from your own computer.
  21. so do a query to select based on the info. If you get a result, it exists. therefore update. If not, insert.
  22. you need to use ajax or flash for something like real-time chat.
  23. maybe it doesn't work because you have it commented out?
×
×
  • 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.