Welcome Guest, Not a member yet? Register   Sign In
Web Scraping in CI4
#3

(This post was last modified: 06-19-2024, 04:43 PM by minsk832.)

You can easily use and integrate PHP libraries like

https://github.com/voku/simple_html_dom
https://github.com/spekulatius/PHPScraper

in CodeIgniter. Simply create a library.

PHP Code:
namespace App\Libraries;

use 
simplehtmldom\HtmlWeb;

class 
HtmlDomParser
{
    public function parseFromUrl($url)
    {
        $htmlWeb = new HtmlWeb();
        $html $htmlWeb->load($url);

        return $html;
    }

Reply


Messages In This Thread
Web Scraping in CI4 - by nvl - 04-23-2024, 08:28 AM
RE: Web Scraping in CI4 - by InsiteFX - 04-23-2024, 09:56 PM
RE: Web Scraping in CI4 - by minsk832 - 06-19-2024, 04:38 PM



Theme © iAndrew 2016 - Forum software by © MyBB