Jump to content

bananaman

New Members
  • Posts

    2
  • Joined

  • Last visited

bananaman's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Hi, please help me for school i need to make an assignment and i need to make an script with regular expressions to get an image from a site named asaphshop.nl. but the only thing happens is that it's searching in the localhost what should be on the site. this is my code: ​ <?php header('Content-Type: text/html; charset=utf-8'); $url = "http://www.asaphshop.nl/epages/asaphnl.sf/nl_NL/?ObjectPath=/Shops/asaphnl/Products/80203122"; $htmlcode = file_get_contents($url); $pattern = '#class="noscript">.*(<img.*>).*</div>#isU'; preg_match_all($pattern, $htmlcode, $matches); //print_r ($matches); $image = ($matches[0]); print_r ($image); ?> in the attached file is the thing i get
×
×
  • 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.