Jump to content

[SOLVED] Optimization?


Michdd

Recommended Posts

How can I optimize this? There might be some white space between the <span> opening and closing tags and the <a> tag(s).

 

	preg_match_all('/\<span class="cclass"\>(.+?)\<\/span\>/s', file_get_contents('http://twitter.com/' . $user), $matches);
for($i = 0;$i < count($matches[1]);$i++)
{
	preg_match('/\<a href="(.+?)"/', trim($matches[1][$i]), $found[$i]);
	$results[] = substr($found[$i][1], 1);
}
return $results;

Link to comment
https://forums.phpfreaks.com/topic/168098-solved-optimization/
Share on other sites

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.