Jump to content

.josh

Staff Alumni
  • Posts

    14,780
  • Joined

  • Last visited

  • Days Won

    43

Everything posted by .josh

  1. while ($r = mysql_fetch_array($res)) { echo $r[0]." Selected Google.<br>"; }
  2. once you define a constant, it cannot be changed (or undefined and redefined).
  3. did you wrap it in php tags? <?php // code here ?> and does your file have a .php extension, or is an extension (mime type) recognized by your server to parse php?
  4. for one, you are ordering by your table name
  5. If you happen to know the maximum length any line can be, you can just pad it with $max-strlen(data) spaces
  6. $string = "<a href='blah.php'>blah</a>"; echo htmlentities($string); // will echo out the literal string, instead of rendering as a link
  7. maybe I'm misunderstanding the goal here, so maybe this won't help, but if you assign something to a variable using single quotes, it will be interpreted literally. So for instance: $x = 'one'; $string1 = "the number $x"; $string2 = 'the number $x'; echo $string1; // output: the number one echo $string2; // output: the number $x You can then use eval on $string2 later on to get it to actually interpret $x as whatever.
  8. Ah okay. Wasn't necessarily trying to take a jab at you. Just that most people seem to kind of just throw everything into a single table and then select *.
  9. you didn't name your submit button so your condition never evaluates true.
  10. $subject = ""; // wherever you get the info to be regexed $replacement = '$0<input type=hidden name="source" value="'.$_SERVER[php_SELF].'" />'; $subject = preg_replace('/(<form.*?action="process.php".*?>)/', $replacement, $subject);
  11. Dude seriously, you started this thread saying you were looking for a script you lost. And you asked for help. I pointed you at some functions that might help you. You brushed it off. You clearly wanted people to help you look for this script you lost. You're being an ass. And apparently this isn't the first time. I'm closing this thread, just like your last one was closed. I'm starting to see a pattern here. I hope you are, as well. When you're pointing your 1 finger at everybody else, and everybody else is pointing all their fingers at you, chances are very high that you are the one responding inappropriately.
  12. To match and replace all images in the string, you need to use preg_match_all and loop through each match. preg_match_all returns a different array structure than preg_match, because it has more than one match. Read the manual. <?php preg_match_all('/(<img.*?src="(.*?)".*?>)/',$message,$match); foreach($match[2] as $key => $pic) { $picinfo = getimagesize($pic); $picinfo[0] = ($picinfo[0] > 430)? 430 : $picinfo[0]; $replacement = 'img src="'.$pic.'" width="'.$picinfo[0].'" height="'.$picinfo[1].'" border="0" alt="" /'; $message = preg_replace($match[1][$key], $replacement, $message); } // end foreach
  13. I'm closing this thread as your other one is the exact same as this one, and you seem to be hovering around inside the other one. Please do not make multiple posts asking the same thing.
  14. Job vacancy? Looking for a replacement? just echo the variable in question out to see what's in it. echo $_FILES["attachment"]["type"];
  15. Okay well if it's gonna be that the beginning of the string and a <br> is there "most" of the time, then you can do this: $html = "http://www.google.com<br />Go there for a cool search engine!"; preg_match("/(.*?)<br.*?>/",$html,$matches); print_r($matches);
  16. will there always be a <br> after the link? Will the link always be at the beginning of the string? In order to accurately extract it from the string, a pattern has to be established. A pattern, of course, being something that happens on a regular, predictable basis. It's not really going to be possible to accurately pull a url out from a string if it's just randomly amongst other stuff...
  17. Dude, whatever. I offered you an alternative and even pointed some functions at you to get you started, and you responded with more whining about how you just wanted to find the script. I then responded by giving you an unbiased assessment of your situation. If you really did bust out a new script during this time, more than likely it's based off of the very functions I pointed you at, so don't give me this crap about being condescending and unhelpful. Next time, try just saying thank you.
  18. Perhaps your mysql was dying because you had a very poor data structure going on?
  19. Dunno what to tell you, man. I doubt anybody here is going to recognize this random obscure script of yours. Nor do I think anybody is gonna really be interested in being your personal google researcher. Realistically, your options include writing a new one yourself, or else hiring someone else to do it for you.
  20. Lies! That's way too obvious to be true.
  21. You could always just make your own. Doesn't sound like it would be that hard. Look into glob and array_rand
  22. I can't imagine coding anything any kind of length in asm. Might be easier than physical electronics though lol. Yeah well, back then, we weren't living in an ADHD rampant society like we are today, where people's attention spans rival that of a ferret on crack. Also, computers were a lot less capable then than they are today. What was uber l33t back in the day in terms of storage space, memory, processing power, is a drop in the bucket, compared to today's levels.
  23. Using drivers not specifically designed for the hardware can result in poor performance.
  24. I'd suggest googling "known proxy ip addresses" but you obviously must have already tried that
  25. Actually... The original Pong game was not written in any language. It used no cpu or game code software at all. It was made using pure physical electronics. gate chips, timers, counter chips, ttl circuits, etc...
×
×
  • 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.