Jump to content

MadTechie

Staff Alumni
  • Posts

    9,409
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by MadTechie

  1. try <?php $length = 8; echo substr(md5(mt_rand( 0,65536)),0,$length); ?> its kinda simple but random!
  2. <?php $data = curl_exec ($ch); if (preg_match('%<Font\sclass=price>([0-9\.]+\s+\w+)\<\/Font>%i', $data, $regs)) { $price = $regs[0]; } else { $price = ""; } echo $price; ?>
  3. change if (preg_match('%<Font\\sclass=price>([0-9\\.]+\\s+\\w+)\\<\\/Font>%i', $output, $regs)) { to if (preg_match('%<Font\sclass=price>([0-9\.]+\s+\w+)\<\/Font>%i', $output, $regs)) {
  4. OH if you post a lot please use code tags
  5. "UPDATE users SET status = '1' WHERE userid= '".md5($_GET['hash'])."' AND key = '".$_GET['key']."'";
  6. It should find the price in a the html if its a whole page or just a shortline can you post a failed input please
  7. try <?php $data = "<FONT class=price>239.00 GBP</FONT>"; if (preg_match('%<Font\sclass=price>([0-9\.]+\s+\w+)\<\/Font>%i', $data, $regs)) { $price = $regs[0]; } else { $price = ""; } echo $price; ?>
  8. ADD THE ; at the end Theirs a Ton of holes in the code you have posted.. even the short code above has a secuity hole Oh i give!
  9. yep implode <?php $theArray = array("hello","to","the","world"); $theString = implode(",", $theArray ); echo $theString; ?>
  10. missed the last " <? UPDATE users SET status = '1' WHERE userid= '".md5($_GET['hash']."' AND key = '".$_GET['key']."'" ?>
  11. Click solved (bottom left)
  12. ."$url = 'http://www.runnerselite.com/website/activate.php?hash=".md5($userid)."&key=($key)";
  13. i posted before your edit my "better one" refers to PC Nerds
  14. this works better <?php $string = "Blar"; $pattern[0] = '/badword1/'; $pattern[1] = '/badword2/'; $replacement[0] = '@@@@@'; $replacement[1] = '@@@@@'; $string = preg_replace($pattern, $replacement, $string); ?>
  15. use Captcha image verification as for bad words use str_replace
  16. try "UPDATE users SET status = '1' WHERE userid= '".md5($_GET['hash']."' AND key = '".$_GET['key']."'"
  17. to send a post your need to understand sockets
  18. use $q = "SELECT password FROM ".TBL_USERS." WHERE username = '$username' AND status = '1'"; then.. if that failed then no idea.. i'm not very good at spaghetti code.
  19. Not a php question, so wrong section
  20. just update the failed login attempt, it would be easier
  21. please use code tags but $sql = mysql_query("SELECT * FROM `forum_topics` LIMIT $from, $max_results"); isn't being used so surely you should do this ## Pagination start ############################################################# $query2 = "SELECT * FROM `forum_topics` WHERE `topic_id`='$id' ORDER BY `topic_name` DESC LIMIT $from, $max_results"; $result2 = mysql_query($query2) or die (mysql_error());
  22. Good advice from chigley echo chigley
  23. $desc2 = stripslashes(nl2br($row2['ptxt_body'])); $desc3 = htmlentities($desc2); <textarea name="description" cols="40" rows="7" wrap="PHYSICAL" id="description">'.strip_tags($desc3, '<b><br /><i>').'</textarea> OK the htmlentities will convert > to > etc so it will always fail.. also the stripslashes will remove the / so <br /> will fail Ahhh Andys on the scene.. no posts are safe
  24. please post code in code tags
  25. $q = "SELECT password FROM ".TBL_USERS." WHERE username = '$username' AND status = 1";
×
×
  • 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.