P
P
paulvales2015-10-19 17:03:24
PHP
paulvales, 2015-10-19 17:03:24

How to parse an image from a folder?

Hello, in general, I parse pictures like this:
/<img .*?(?=src)src=\"([^\"]+)\"/si"
Displays:
www.ikea.com/ms/img/header/logo.gif
www.ikea.com/ms/ru_RU/img/ads/askanna.jpg
www.ikea.com/ms/img www.ikea.com/ms/media/seorange/20153/20151_dica04a
...
www.ikea.com/PIAimages/0322782_PE516321_S3.JPG
www.ikea.com/PIAimages/0355650_PE547817_S3.JPG
_ com/PIAimages/0292760_PE425390_S3.JPG
www.ikea.com/PIAimages/0325067_PE523174_S3.JPG
What needs to be added to take pictures only from the "PIAimages" folder?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Dimonchik, 2015-10-19
@paulvales

check the occurrence of substr "/PIAimages/"
php.net/manual/en/function.substr.php
and slowly learn how to get links with simplehtmldom.sourceforge.net

A
Andrew, 2015-10-19
@R0dger

Try like this
\<img src=\".+?\/PIAimages\/(.+)\"\gi

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question