Jump to content

[SOLVED] help me debug pls


iceman400

Recommended Posts

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

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.

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.