Question : if there is a duplicated item, how can i make it just one if there more???

Hey experts,
Im doing a foreach searching for imgs tags here is the code
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
if(preg_match_all('/(<img (.*))\s (src="((.*))")/isxmU', file_get_contents("http://www.smashingmagazine.com/2008/02/12/really-stunning-desktop-wallpapers/"), $images)){
		    
			/* limit number of images shown */
		    $limit = 5;
		    $i=0;
		    $max_width = 150;
			$max_height = 150;
			foreach($images[3] as $image_url):
			$image_url = trim($image_url, 'src=');
    		$image_url = trim($image_url, '"');
        	$valid_files = substr($image_url, -3);
	        if($valid_files == "png" || $valid_files == "jpg" ){
	        	echo $image_url."<br>";
	        }
	        endforeach;
    }

If you run this code you will find that there is a looot of this link "http://media.smashingmagazine.com/cdn_smash/wp-content/themes/default-autosvn-stable/images/gravatar_default.png"
it's duplicated

so how can i make this code read if there is any item is duplicated delete all of the duplicated and leave the only one item?

Thanks

Answer : if there is a duplicated item, how can i make it just one if there more???

Hi eseutil

yes i have seen this issue many times, you mention that it is successful on another machine, ask your self what is the difference between the two machines? What i suggest is to reconfigure the dl 380 to a similar config as the machine which eseutil works on. you mention that you have reduced the RAM, and have run exbpa. exbpa would have nothing to do with your eseutil issues as you can run eseutil without an exchange install. How many processor cores do you have, try and reduce the cores to 2 and see how you go. if it worked on another machine without copying the jcb.dll in every directory and registering dll's it will work on the dl380. Run eseutil as normal just change the number of cores, i think this will solve your issue.

Let me know how you go eseutil.


Random Solutions  
 
programming4us programming4us