iceman400 Posted March 6, 2007 Share Posted March 6, 2007 this bit of code timesout (php.ini is set to 30 seconds, but the code should take no more than 5 seconds to complete). whats wrong with it? //$noquote is a str of html containing unwanted symbols $symbols = array("'", "\"", ")", "(", "!", "@", "$", "^", "*", "\\", "<", ">", ";", ":", " "); foreach($noquote as $noquote){ foreach($symbols as $s){ while ($line = explode($s, $noquote)){ $noquote = implode("", $line); } } } help me please Link to comment https://forums.phpfreaks.com/topic/41412-solved-help-me-debug-pls/ Share on other sites More sharing options...
btherl Posted March 6, 2007 Share Posted March 6, 2007 What do you want your code to do? Link to comment https://forums.phpfreaks.com/topic/41412-solved-help-me-debug-pls/#findComment-200592 Share on other sites More sharing options...
iceman400 Posted March 6, 2007 Author Share Posted March 6, 2007 what im trying to do is extract bits of url from strings of javascript & html. sometimes the only available bits are the page name (pagename.php) and sometimes the whole address (http://......php).the specific bit of code i posted is supposed to sift out any types of symbols that are not part of a web address (such as "*") and return the result. 2 c whether or not the returned string is a web address, i try to fopen() it. if it works, i save the address, if not, i move on to the next bit of string. Link to comment https://forums.phpfreaks.com/topic/41412-solved-help-me-debug-pls/#findComment-200595 Share on other sites More sharing options...
iceman400 Posted March 6, 2007 Author Share Posted March 6, 2007 sorry to bump myself but i really need this asap pls :'( Link to comment https://forums.phpfreaks.com/topic/41412-solved-help-me-debug-pls/#findComment-200660 Share on other sites More sharing options...
iceman400 Posted March 6, 2007 Author Share Posted March 6, 2007 well, some1 close this thread please. my brain muxt be on vacation...forgot about good old str_replace. lol thanx anyway Link to comment https://forums.phpfreaks.com/topic/41412-solved-help-me-debug-pls/#findComment-200674 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.