Форум Flasher.ru
Ближайшие курсы в Школе RealTime
Список интенсивных курсов: [см.]  
  
Специальные предложения: [см.]  
  
 
Регистрация Блоги Правила Справка Пользователи Календарь Поиск рулит! Сообщения за день Все разделы прочитаны
 

Вернуться   Форум Flasher.ru > Flash > Серверные технологии и Flash

Версия для печати  Отправить по электронной почте    « Предыдущая тема | Следующая тема »  
Опции темы Опции просмотра
 
Создать новую тему Ответ
Старый 05.12.2012, 14:22
yo3o вне форума Посмотреть профиль Отправить личное сообщение для yo3o Найти все сообщения от yo3o
  № 1  
Ответить с цитированием
yo3o

Регистрация: Jun 2010
Сообщений: 153
По умолчанию php парсер ссылок

Всем привет! ребята помогите! целый день убил! немогу сделать регулярку и все тут! помогите составить!!!
вот из этого хтмл кода нужно собрать все ссылки (пример ссылок:
Цитата:
<a href="http://m.aliexpress.com/item/643533878.html" prodid="643533878">
)
Код:
<meta charset="UTF-8"/>ul id="product-list">
		        <li class="list-item">
            <a href="http://m.aliexpress.com/item/643533878.html" prodid="643533878">
                <div class="img">
                    <img   src="http://i00.i.aliimg.com/wsphoto/v0/643533878/jacket-for-men-hoddies-fashion-style-three-colors-available-free-shipping-MWW013.summ.jpg"/>
                </div>
                <div class="info">
                    <div class="title">
                       jacket for men hoddies fashion style three colors available free shipping,MWW013
                    </div>
                    <div>
                        <span class="price">
															<span class="value">US $18.55</span>
							                            <span>/</span>
                            <span>piece</span>
                        </span>
													<span class="free-s"> Free Shipping</span>
						                        <p class="tip">
    						                        </p>
                    </div>
                    <div class="rate-history">
                        <span  class="orders">
															21 Orders  (23 piece)
													</span>
                    </div>
                </div>
            </a>
        </li>
		        <li class="list-item">
            <a href="http://m.aliexpress.com/item/534435027.html" prodid="534435027">
                <div class="img">
                    <img   src="http://i01.i.aliimg.com/wsphoto/v2/534435027_1/Free-Shipping-2012-New-Men-s-Jackets-Hot-Men-s-HoodieHot-Men-s-Clothes-Color-Black.summ.jpg"/>
                </div>
                <div class="info">
                    <div class="title">
                       Free Shipping 2012 New Men's Jackets Hot Men's HoodieHot Men's Clothes Color:Black,White,Coffee Size:M-L-XL-XXL W16
                    </div>
                    <div>
                        <span class="price">
															<span class="value">US $20.33</span>
							                            <span>/</span>
                            <span>piece</span>
                        </span>
													<span class="free-s"> Free Shipping</span>
						                        <p class="tip">
    						                        </p>
                    </div>
                    <div class="rate-history">
                        <span  class="orders">
															29 Orders  (29 piece)
													</span>
                    </div>
                </div>
            </a>
        </li>
		        <li class="list-item">
            <a href="http://m.aliexpress.com/item/689288412.html" prodid="689288412">
                <div class="img">
                    <img   src="http://i00.i.aliimg.com/wsphoto/v0/689288412/Free-Shipping-Hot-High-Collar-Coat-Men-s-Jackets-Top-Brand-Men-s-Jackets-Men-s.summ.jpg"/>
                </div>
                <div class="info">
                    <div class="title">
                       Free Shipping Hot High Collar Coat Men's Jackets,Top Brand Men's Jackets,Men's Hoodeies Men's Clothing 4 Colors Size:M-XXXL
                    </div>
                    <div>
                        <span class="price">
															<span class="value">US $11.38</span>
							                            <span>/</span>
                            <span>piece</span>
                        </span>
													<span class="free-s"> Free Shipping</span>
						                        <p class="tip">
    						                        </p>
                    </div>
                    <div class="rate-history">
                        <span  class="orders">
															14 Orders  (15 piece)
													</span>
                    </div>
                </div>
            </a>
        </li>
		        <li class="list-item">
            <a href="http://m.aliexpress.com/item/634413796.html" prodid="634413796">
                <div class="img">
                    <img   src="http://i00.i.aliimg.com/wsphoto/v1/634413796_1/201230037-2012-Fashion-Style-Men-s-Knitwear-Suits-4-Sizes-3-Colors.summ.jpg"/>
                </div>
                <div class="info">
                    <div class="title">
                       201230037 2012 Fashion Style Men's Knitwear Suits 4 Sizes 3 Colors
                    </div>
                    <div>
                        <span class="price">
															<span class="value">US $11.99</span>
							                            <span>/</span>
                            <span>piece</span>
                        </span>
													<span class="free-s"> Free Shipping</span>
						                        <p class="tip">
    						                        </p>
                    </div>
                    <div class="rate-history">
                        <span  class="orders">
															84 Orders  (86 piece)
													</span>
                    </div>
                </div>
            </a>
        </li>
		        <li class="list-item">
            <a href="http://m.aliexpress.com/item/604055654.html" prodid="604055654">
                <div class="img">
                    <img   src="http://i00.i.aliimg.com/wsphoto/v1/604055654_1/Free-shipping-2012-new-arrivals-men-Slim-fit-long-Sleeves-Polo-shirts-wholesale-retail.summ.jpg"/>
                </div>
                <div class="info">
                    <div class="title">
                       Free shipping .2012 new arrivals .men  Slim fit  long Sleeves Polo shirts .wholesale retail
                    </div>
                    <div>
                        <span class="price">
															<span class="value">US $13.98</span>
							                            <span>/</span>
                            <span>piece</span>
                        </span>
													<span class="free-s"> Free Shipping</span>
						                        <p class="tip">
    						                        </p>
                    </div>
                    <div class="rate-history">
                        <span  class="orders">
															84 Orders  (89 piece)
													</span>
                    </div>
                </div>
            </a>
        </li>
		        <li class="list-item">
            <a href="http://m.aliexpress.com/item/599025620.html" prodid="599025620">
                <div class="img">
                    <img   src="http://i00.i.aliimg.com/wsphoto/v3/599025620_1/2012-FREE-SHIPPING-sports-long-sleeve-iautumn-and-winter-men-s-clothing-coat-Wear-hat-clothing.summ.jpg"/>
                </div>
                <div class="info">
                    <div class="title">
                       2012/FREE SHIPPING/sports/long sleeve/iautumn and winter/men's clothing/coat/ Wear hat clothing/health garments
                    </div>
                    <div>
                        <span class="price">
															<span class="value">US $12.99 - 19.99</span>
							                            <span>/</span>
                            <span>piece</span>
                        </span>
													<span class="free-s"> Free Shipping</span>
						                        <p class="tip">
    						                        </p>
                    </div>
                    <div class="rate-history">
                        <span  class="orders">
															153 Orders  (159 piece)
													</span>
                    </div>
                </div>
            </a>
        </li>
		        <li class="list-item">
            <a href="http://m.aliexpress.com/item/517877342.html" prodid="517877342">
                <div class="img">
                    <img   src="http://i00.i.aliimg.com/wsphoto/v3/517877342_1/Men-s-Cotton-Blends-Printing-Hoody-Popular-Men-s-Coat-Men-s-Hoody-Fashion-Hoody.summ.jpg"/>
                </div>
                <div class="info">
                    <div class="title">
                       Men's Cotton Blends Printing Hoody,Popular Men's Coat Men's Hoody Fashion Hoody
                    </div>
                    <div>
                        <span class="price">
															<span class="value">US $17.99</span>
							                            <span>/</span>
                            <span>piece</span>
                        </span>
													<span class="free-s"> Free Shipping</span>
						                        <p class="tip">
    						                        </p>
                    </div>
                    <div class="rate-history">
                        <span  class="orders">
															36 Orders  (37 piece)
													</span>
                    </div>
                </div>
            </a>
        </li>
		        <li class="list-item">
            <a href="http://m.aliexpress.com/item/594349202.html" prodid="594349202">
                <div class="img">
                    <img   src="http://i00.i.aliimg.com/wsphoto/v0/594349202/Free-Shipping-Men-s-Knitwear-Cardigan-Fake-Pocket-Design-Slim-Casual-Sweater-Coat-M-L-XL.summ.jpg"/>
                </div>
                <div class="info">
                    <div class="title">
                       Free Shipping Men's Knitwear Cardigan Fake Pocket Design Slim Casual Sweater Coat M L XL Black, Gray Retail &amp; Wholesale 5450
                    </div>
                    <div>
                        <span class="price">
															<span class="value">US $15.20</span>
							                            <span>/</span>
                            <span>piece</span>
                        </span>
													<span class="free-s"> Free Shipping</span>
						                        <p class="tip">
    						                        </p>
                    </div>
                    <div class="rate-history">
                        <span  class="orders">
															43 Orders  (59 piece)
													</span>
                    </div>
                </div>
            </a>
        </li>
		        <li class="list-item">
            <a href="http://m.aliexpress.com/item/672083044.html" prodid="672083044">
                <div class="img">
                    <img   src="http://i00.i.aliimg.com/wsphoto/v0/672083044_1/Free-shipping-2013-autumnand-winter-men-s-long-sleeve-cool-t-shirt-fashion-polo-shirt-black.summ.jpg"/>
                </div>
                <div class="info">
                    <div class="title">
                       Free shipping 2013 autumnand winter  men's long sleeve cool t shirt fashion polo shirt ,black,white wine red, M-XXL
                    </div>
                    <div>
                        <span class="price">
															<span class="value">US $14.45</span>
							                            <span>/</span>
                            <span>piece</span>
                        </span>
													<span class="free-s"> Free Shipping</span>
						                        <p class="tip">
    						                        </p>
                    </div>
                    <div class="rate-history">
                        <span  class="orders">
															30 Orders  (33 piece)
													</span>
                    </div>
                </div>
            </a>
        </li>
		        <li class="list-item">
            <a href="http://m.aliexpress.com/item/643185816.html" prodid="643185816">
                <div class="img">
                    <img   src="http://i00.i.aliimg.com/wsphoto/v0/643185816_1/64-WY-Men-s-casual-sweatshirt-hot-style-Cardigan-5-colors-casual-jacket-fashion-top-Freeshipping.summ.jpg"/>
                </div>
                <div class="info">
                    <div class="title">
                       64 WY  ,   Men`s casual sweatshirt , hot style Cardigan, 5 colors ,casual jacket , fashion top . Freeshipping
                    </div>
                    <div>
                        <span class="price">
															<span class="value">US $9.99</span>
							                            <span>/</span>
                            <span>piece</span>
                        </span>
													<span class="free-s"> Free Shipping</span>
						                        <p class="tip">
    						                        </p>
                    </div>
                    <div class="rate-history">
                        <span  class="orders">
															42 Orders  (48 piece)
													</span>
                    </div>
                </div>
            </a>
        </li>
		        <li class="list-item">
            <a href="http://m.aliexpress.com/item/538614207.html" prodid="538614207">
                <div class="img">
                    <img   src="http://i01.i.aliimg.com/wsphoto/v9/538614207_1/2012-Hooded-clothes-jackets-Men-s-dust-coat-High-Collar-Men-s-Jackets-top-brand-men.summ.jpg"/>
                </div>
                <div class="info">
                    <div class="title">
                       2012 Hooded clothes jackets Men's dust coat  High Collar Men's Jackets top brand men's  free shipping B441
                    </div>
                    <div>
                        <span class="price">
															<span class="value">US $15.59</span>
							                            <span>/</span>
                            <span>piece</span>
                        </span>
													<span class="free-s"> Free Shipping</span>
						                        <p class="tip">
    						                        </p>
                    </div>
                    <div class="rate-history">
                        <span  class="orders">
															168 Orders  (204 piece)
													</span>
                    </div>
                </div>
            </a>
        </li>
		        <li class="list-item">
            <a href="http://m.aliexpress.com/item/587810086.html" prodid="587810086">
                <div class="img">
                    <img   src="http://i00.i.aliimg.com/wsphoto/v0/587810086_1/2012-Free-Shipping-NEW-Mens-Slim-Fit-Sexy-Top-Designed-Hoodies-Jackets-Coats-M-L-XL.summ.jpg"/>
                </div>
                <div class="info">
                    <div class="title">
                       2012 Free Shipping NEW Mens Slim Fit Sexy Top Designed Hoodies Jackets Coats M L XL XXL Colors Black White Coffee Gray Dark gray
                    </div>
                    <div>
                        <span class="price">
															<span class="value">US $13.00</span>
							                            <span>/</span>
                            <span>piece</span>
                        </span>
													<span class="free-s"> Free Shipping</span>
						                        <p class="tip">
    						                        </p>
                    </div>
                    <div class="rate-history">
                        <span  class="orders">
															49 Orders  (60 piece)
													</span>
                    </div>
                </div>
            </a>
        </li>
		        <li class="list-item">
            <a href="http://m.aliexpress.com/item/644273759.html" prodid="644273759">
                <div class="img">
                    <img   src="http://i01.i.aliimg.com/wsphoto/v0/644273759/Hot-Sell-Autumn-Mens-Uk-Style-Shirts-Long-Sleeve-Casual-Lapel-Long-Sleeve-Cotton-Shirt-2.summ.jpg"/>
                </div>
                <div class="info">
                    <div class="title">
                       Hot Sell Autumn Mens Uk Style Shirts Long Sleeve Casual Lapel Long Sleeve Cotton Shirt 2 Colors Black Grey Size M L XL 2XL
                    </div>
                    <div>
                        <span class="price">
															<span class="value">US $15.49</span>
							                            <span>/</span>
                            <span>piece</span>
                        </span>
													<span class="free-s"> Free Shipping</span>
						                        <p class="tip">
    						                        </p>
                    </div>
                    <div class="rate-history">
                        <span  class="orders">
															31 Orders  (32 piece)
													</span>
                    </div>
                </div>
            </a>
        </li>
		        <li class="list-item">
            <a href="http://m.aliexpress.com/item/670392713.html" prodid="670392713">
                <div class="img">
                    <img   src="http://i01.i.aliimg.com/wsphoto/v0/670392713/ALLFORYOU-Freeshipping-Autumn-and-Winter-Male-Slim-Sweatshirt-with-a-Hood-FWT287-SIZE-M-XXL.summ.jpg"/>
                </div>
                <div class="info">
                    <div class="title">
                       ALLFORYOU  Freeshipping  Autumn and Winter Male Slim  Sweatshirt with a Hood    FWT287  SIZE: M-XXL
                    </div>
                    <div>
                        <span class="price">
															<span class="value">US $24.69</span>
							                            <span>/</span>
                            <span>piece</span>
                        </span>
													<span class="free-s"> Free Shipping</span>
						                        <p class="tip">
    						                        </p>
                    </div>
                    <div class="rate-history">
                        <span  class="orders">
															20 Orders  (24 piece)
													</span>
                    </div>
                </div>
            </a>
        </li>
		        <li class="list-item">
            <a href="http://m.aliexpress.com/item/536098383.html" prodid="536098383">
                <div class="img">
                    <img   src="http://i01.i.aliimg.com/wsphoto/v5/536098383_1/FREE-SHIPPING-Slim-Jackets-Mens-Special-Zipper-Hoodie-Jacket-3-Colors-4-Sizes-Top-Designed-Gift.summ.jpg"/>
                </div>
                <div class="info">
                    <div class="title">
                       FREE SHIPPING Slim Jackets Mens Special Zipper Hoodie Jacket 3 Colors 4 Sizes Top Designed Gift   0033
                    </div>
                    <div>
                        <span class="price">
															<span class="value">US $15.00</span>
							                            <span>/</span>
                            <span>piece</span>
                        </span>
													<span class="free-s"> Free Shipping</span>
						                        <p class="tip">
    						                        </p>
                    </div>
                    <div class="rate-history">
                        <span  class="orders">
															393 Orders  (455 piece)
													</span>
                    </div>
                </div>
            </a>
        </li>
		    </ul>
	    <div <br>
помогите очень прошу! целый день сижу и не могу сделать((

Старый 05.12.2012, 20:28
leofit вне форума Посмотреть профиль Отправить личное сообщение для leofit Найти все сообщения от leofit
  № 2  
Ответить с цитированием
leofit
 
Аватар для leofit

Регистрация: Dec 2009
Сообщений: 428
Именно с тегами?
(<a href=[^>]+>)
Если только URL то
<a href=\"([^\"]+)"
__________________
Скажи мне кто твой друг и я скажу тебе кто твой друг

Создать новую тему Ответ Часовой пояс GMT +4, время: 02:59.
Быстрый переход
  « Предыдущая тема | Следующая тема »  
Опции темы
Опции просмотра

Ваши права в разделе
Вы не можете создавать новые темы
Вы не можете отвечать в темах
Вы не можете прикреплять вложения
Вы не можете редактировать свои сообщения

BB коды Вкл.
Смайлы Вкл.
[IMG] код Вкл.
HTML код Выкл.


 


Часовой пояс GMT +4, время: 02:59.


Copyright © 1999-2008 Flasher.ru. All rights reserved.
Работает на vBulletin®. Copyright ©2000 - 2022, Jelsoft Enterprises Ltd. Перевод: zCarot
Администрация сайта не несёт ответственности за любую предоставленную посетителями информацию. Подробнее см. Правила.