$str = 'img src="http://static.sanook.com/www/files/firstpage_v1/imgs_event/haiti.gif" http://static.sanook.com/www/icons/new_look.gif ssss http://static.sanook.com/www/icons/intrend.gif sdfasf http://static.sanook.com/www/icons/vdo_new_1.gifdfasdfasdf'; $regex = '/http:\/\/static.sanook.com(\/\w+)+\.(jpe?g|gif|png)/i'; echo 'match count: ', preg_match_all($regex, $str, $match); echo '<br>'; $arr = $match[0]; foreach($arr as $val) echo $val, '<br>';
$str = file_get_contents('http://www.sanook.com/'); $regex = '/http:\/\/fp1.fsanook.com(\/\w+)+\.(jpe?g|gif|png)/i'; echo 'match count: ', preg_match_all($regex, $str, $match); echo '<br>'; $arr = $match[0]; foreach($arr as $val) echo $val, '<br>';
เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง