Jump to content

MadTechie

Staff Alumni
  • Posts

    9,409
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by MadTechie

  1. erm.. i maybe missing something but wouldn't this work ? $RSSFEED = " blar blar blar blar blar blar blar blar blar blar blar blar blar blar blar blar blar blar blar blar blar blar blar blar blar blar blar blar blar blar blar blar blar blar blar blar blar blar blar blar blar blar blar blar blar blar blar blar blar blar blar blar blar blar blar blar blar blar blar blar blar blar blar blar blar blar blar blar blar blar blar blar blar blar blar blar blar blar blar blar blar blar blar blar blar blar blar blar blar blar blar blar blar blar blar blar blar blar blar blar blar blar blar blar blar blar blar blar blar blar blar blar blar blar blar blar blar blar blar blar blar blar blar blar blar blar blar blar blar blar blar blar blar blar blar blar blar blar blar blar blar blar blar blar blar blar blar blar blarblar blar blar blar blar 12345 my website 567890blar blarblar blar blar blar blarblar blarblar blar blar blar blarblar blarblar blar blar blar blarblar blarblar blar blar blar blar "; if (preg_match('/(.*)my website/si', $RSSFEED, $regs)) { $result = $regs[1]; } echo $result;
  2. Try this. <?php // Getformdataandcreateemail $FromEMail = "mail@mywebsite.co.uk"; $ToEMail=$_POST['Email']; if(!preg_match('/\A(?:^[a-z0-9!#$%&\'*+\/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&\'*+\/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$)\Z/i', $ToEMail)) { die ("$ToEMail in an invalid email"); } $name=stripslashes($_POST['Name']); $subject=stripslashes($_POST['Subject']); $messagecont=stripslashes($_POST['Message']); $message= <<<EOD -------------------------------- Enquiry from your website -------------------------------- Name: $name Subject: $subject EmailAddress: $email Message: $messagecont -------------------------------- End of Message -------------------------------- EOD; //Sendemail @mail($ToEMail,$subject,$message, "From:$FromEMail"); header("Location:thankyou.html"); ?>
  3. your code should be this <?php $Find = "<link to phil.php display_as Philosophy<end link>"; $replace= preg_replace('/<link to ([\S]*) display_as (.*)(?:<end link>)/i', '<a href=\'http://www.robbertlaw.com/$1\'>$2</a>', $Find); echo replace; ?>
  4. try this $HTML = $thehtmlpage; preg_match_all('/(?:href\s?=\s?(?:"|\'))(.*?)(?:"|\')/i', $HTML, $result, PREG_PATTERN_ORDER); $result = $result[0]; print_r($result); or $HTML = $thehtmlpage; preg_match_all('/\bwww\.[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|]/i', $HTML , $result, PREG_PATTERN_ORDER); $result = $result[0]; this will find URL's formatted text
  5. try this <?php ob_start();//added include "../dbconnect.php"; $input = mysql_query("INSERT INTO body(tooltip,woorden,words,image) VALUES ('$tooltip','$woorden','$words','$fupload_name')"); function changeimage($nm_gambar) { ob_end_clean(); //added header("Content-type:image/jpeg"); ...... imagejpeg($im, $nm_img, $quality); imagedestroy($im_src); imagedestroy($im); }
  6. PHP makes a request to the mail server, the most common timeouts are 30-90 seconds (of inactivity), the most common problem with timeouts in php are when nothing is sent to the page thus "inactive" have you tried echoing after each mail has been sent eg results email sent to:bob@whatever.com email sent to:bobby@whatever.com email sent to:sam@whatever.com email sent to:sammy@whatever.com
  7. can you post the first 10 lines of your code please (from the regex.php file)
  8. replace $email=$_POST['Email']; with $email = $_POST['Email']; if(preg_match('/\A(?:^[a-z0-9!#$%&\'*+\/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&\'*+\/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$)\Z/i', $email )) { echo "email valid"; }
  9. $email = "me@hotmail.com"; if (preg_match('/\b[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}\b/i', $email)) { echo "email valid"; } Better one (RFC 2822 standard) $email = "me@hotmail.com"; if(preg_match('/\A(?:^[a-z0-9!#$%&\'*+\/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&\'*+\/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$)\Z/i', $email )) { echo "email valid"; }
  10. <link to phil.php display_as Philosophy<end link> with <a href='http://www.robbertlaw.com/phil.php'>Philosphy</a> i think this is what you want <?php $Find = "<link to phil.php display_as Philosophy<end link>"; $replace= preg_replace('/<link to ([\S]*) display_as (.*)(?:<end link>)/i', '<a href=\'http://www.robbertlaw.com/$1\'>$2</a>', $Find); echo replace; ?> returns <a href='http://www.robbertlaw.com/phil.php'>Philosophy</a>
  11. its easier to work from things to want to match but try this preg_match_all('/\b(?<=(<a[s]+|<a[^>]|<frame.*?src=)).*?(https?):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|]/i', $subject, $result, PREG_PATTERN_ORDER);
  12. i have done mass mailing a few times and havn't had the problems you are having.. but without knowing the code used to the servers setup.. i can't say what the problem is as for your "understanding" The pages askes and emailing request to the server.. thats makes no sence also where did the "2 secs the max" come from, seams like it was pull out of you head
  13. i read it 3 times it didn't make sense to me
  14. please move to javascript section, allow your site to work without the need for javascript (a lo-fi version)
  15. OK you have posted alot of questions today, what code do you have so far for this question ?
  16. How will adding a name to the button cause a problem...? its a php issule!
  17. well as this is for "stress testing" i think you found it can't handle 20+ emails in one session.. try upgrading to php5
  18. @Chevy: i was refering to zgkhoo " @zgkhoo: any error, wrong field, invalid SQL statement.. have you eveb tried it yet ?
  19. i am note sure what your asking for? it seam you just want two drop down lists ? if so the 2nd list will work like the first!
  20. form is fine, problem is in your php code, please post that
  21. please click solved
  22. that change will NOT fix the problem, as your pulling 'fullname', add the or die(mysql_error()); would of revealed the problem also try replacing echo $row['fullname'] ; with print_r($row); and check that fullname exists (it will not with your last change)
  23. <?php $total = 200; $PerPage = 20; for($n=1;$n<=($total / $PerPage);$n++) { echo "[{$n}]"; } ?>
  24. Personally I Send one mail to myself with BCC all the other members.. saves time and processor unless you NEED each mail to be unique
  25. change if(($Exp[1] === "exe") || ($Exp[1] === "EXE") || ($Exp[1] === "zip") || ($Exp[1] === "ZIP") || ($Exp[1] === "rar") || ($Exp[1] === "RAR")){ $md5name = $findlast; $copy = copy($found, "files" . $md5name); } to if(($Exp[1] === "exe") || ($Exp[1] === "EXE") || ($Exp[1] === "zip") || ($Exp[1] === "ZIP") || ($Exp[1] === "rar") || ($Exp[1] === "RAR")){ $md5name = $findlast; $copy = copy($found, "files/" . $md5name); }
×
×
  • 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.