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

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

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