0

I would like my code to grab a string included between specific html tags on a website I do not own:

https://website.com/Users/bobby

    ...
    <p class="myclass">
    <a href="link.html">634654</a>
    </p>
    ...

How would you guys proceed?

j08691
  • 204,283
  • 31
  • 260
  • 272
bat .t
  • 301
  • 1
  • 4
  • 11
  • Use an HTML parsing library, like `DOMDocument` or `Simple PHP HTML DOM`. – Barmar Oct 29 '14 at 16:16
  • http://code.tutsplus.com/tutorials/html-parsing-and-screen-scraping-with-the-simple-html-dom-library--net-11856 – Kyle Decot Oct 29 '14 at 16:17
  • Ok I got the code, but it returns some error messages: Warning: file_get_contents(https://mywebsite.com/Users/bobby) [function.file-get-contents]: failed to open stream: Invalid argument in W:\var\www\simple_html_dom.php on line 1097 Fatal error: Call to a member function find() on a non-object in W:\var\www\simple_html_dom.php on line 1129 – bat .t Oct 29 '14 at 17:05

0 Answers0