0

I am trying to scrape some data from this webpage.

I have begun by using this code:

$list_url = "http://www.jackwills.com/en-GB/ladies/sale";
$html = file_get_contents($list_url);
echo $html;

However, it's returning the website's error 500 despite the fact that file_get_contents() works with other domains.

Is there a workaround that lets me grab the page I'm after?

UPDATE

Setting ini_set('user_agent','Mozilla/4.0 (compatible; MSIE 6.0)'); has got me halfway there and I now see an HTML page with no styling. The information I need is generated by JavaScript - is there any way to get that?

Community
  • 1
  • 1
Sebastian
  • 3,548
  • 18
  • 60
  • 95

1 Answers1

0

It works for me. check your php.ini related setting such as "allow_url_fopen" that must be on:

allow_url_fopen = On