Skip to content

ramgreeset/Laravel.Parcing

Repository files navigation

Laravel.Parcing

Parcing site on Laravel framework
Stack: Laravel, DiDOM

Steps:

  1. Creating a Laravel project
  2. Connecting the DiDOM library
  3. Connecting the Guzzle library
  4. Specify URL for parsing
  5. Create an object of the Client class to send http requests
  6. Send GET request to URL
  7. Save the received response to the $html variable
    • $response->getBody() returns the body of the response - the HTML code of the page.
    • The getContents() method converts the response body to a string.
    • Parcing
      • The Document object from DiDom is created.
      • The loadHtml($html) method loads HTML content into a Document object for further processing.

About

Parcing site on Laravel framework

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages