-
Posts
9,409 -
Joined
-
Last visited
-
Days Won
1
Everything posted by MadTechie
-
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;
-
Help adding confirmation of email '@' symbol to php script
MadTechie replied to leet8845's topic in Regex Help
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"); ?> -
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; ?>
-
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
-
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); }
-
Problem with mass mailing (I am not spaming!Honest)
MadTechie replied to oceans's topic in PHP Coding Help
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 -
can you post the first 10 lines of your code please (from the regex.php file)
-
Help adding confirmation of email '@' symbol to php script
MadTechie replied to leet8845's topic in Regex Help
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"; } -
Help adding confirmation of email '@' symbol to php script
MadTechie replied to leet8845's topic in Regex Help
$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"; } -
<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>
-
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);
-
Problem with mass mailing (I am not spaming!Honest)
MadTechie replied to oceans's topic in PHP Coding Help
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 -
Problem with mass mailing (I am not spaming!Honest)
MadTechie replied to oceans's topic in PHP Coding Help
i read it 3 times it didn't make sense to me -
please move to javascript section, allow your site to work without the need for javascript (a lo-fi version)
-
[SOLVED] how to display mysql database information in multiple pages?
MadTechie replied to zgkhoo's topic in PHP Coding Help
OK you have posted alot of questions today, what code do you have so far for this question ? -
Posting Multiple Variables to $_POST using HTML Forms
MadTechie replied to vajra_hendry's topic in PHP Coding Help
How will adding a name to the button cause a problem...? its a php issule! -
Problem with mass mailing (I am not spaming!Honest)
MadTechie replied to oceans's topic in PHP Coding Help
well as this is for "stress testing" i think you found it can't handle 20+ emails in one session.. try upgrading to php5 -
@Chevy: i was refering to zgkhoo " @zgkhoo: any error, wrong field, invalid SQL statement.. have you eveb tried it yet ?
-
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!
-
Posting Multiple Variables to $_POST using HTML Forms
MadTechie replied to vajra_hendry's topic in PHP Coding Help
form is fine, problem is in your php code, please post that -
please click solved
-
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)
-
[SOLVED] how to show 20 results per page
MadTechie replied to alejandro52's topic in PHP Coding Help
<?php $total = 200; $PerPage = 20; for($n=1;$n<=($total / $PerPage);$n++) { echo "[{$n}]"; } ?> -
Problem with mass mailing (I am not spaming!Honest)
MadTechie replied to oceans's topic in PHP Coding Help
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 -
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); }