GithubHelp home page GithubHelp logo

htmldom's People

Contributors

alep84 avatar blinkums avatar clemblanco avatar e1111o avatar lahaxearnaud avatar pilou avatar yangqi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

htmldom's Issues

Getting an error for find function

When I execute an example from home page here, I get this error

Call to a member function find() on a non-object

Strange thing is that when I execute this on my localhost, it works as expected, but on remote server it fails. With this error.

Also, when i

var_dump($html)

I can see that it is an object. So any ideas?

latest version

Hi can we get the latest version for this? from master branch

not compatible to php 7.3!

if (!preg_match("/^[\w-:]+$/", $tag)) {

etc fail
See

1) Data\Test\TestCase\Lib\GeoImportLibTest::testImportCountiesCH
preg_match(): Compilation failed: invalid range in character class at offset 4
/home/travis/build/dereuromark/cakephp-data/vendor/yangqi/htmldom/src/Yangqi/Htmldom/Htmldom.php:528
/home/travis/build/dereuromark/cakephp-data/vendor/yangqi/htmldom/src/Yangqi/Htmldom/Htmldom.php:332
/home/travis/build/dereuromark/cakephp-data/vendor/yangqi/htmldom/src/Yangqi/Htmldom/Htmldom.php:164
/home/travis/build/dereuromark/cakephp-data/vendor/yangqi/htmldom/src/Yangqi/Htmldom/Htmldom.php:122

Class not found

Hello,

I have a composer message : "Class 'Yangqi\Htmldom\HtmldomServiceProvider' not found"

SSL3_GET_SERVER_CERTIFICATE:certificate verify failed

I got following Error when I tried with secured url:
ErrorException in Htmldom.php line 178: file_get_contents(): SSL operation failed with code 1. OpenSSL Error messages:
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed

However, I fixed this issue with following extra arguments passed in load_file() method after
$args = func_get_args(); line
in Htmldom class.

$arrContextOptions=array(
"ssl"=>array(
"verify_peer"=>false,
"verify_peer_name"=>false,
),
);
$args[1]=false;
$args[2]=stream_context_create($arrContextOptions);

Just wondering if the author can push it built-in with much cleaner/optimized way instead of hard-coding like I did above.

Release new version

Hi considering release new version? instead use of dev-master in our projects

https problem

please change the constructor, to add support for https urls!

if (preg_match("/^https?:\/\//i",$str) || is_file($str))
    {
    $this->load_file($str);
}

file_get_contents SSL Connection reset by peer

Hello!

use Yangqi\Htmldom\Htmldom;

new Htmldom('https://www.imdb.com/title/tt0115433/');
file_get_contents(): SSL: Connection reset by peer /vendor/yangqi/htmldom/src/Yangqi/Htmldom/Htmldom.php:178

while it's hard for me to tell if this problem is persistent or intermittent, but the problem exists
maybe add ssl.verify_peer_name = false to the $context of file_get_contents()

Get All HTML Elements

Dear Yangqi,
Is there anyway to fetch all html elements like
$html = new \Htmldom($body); foreach ($html as $element) { echo $element->tag; }

Thanks.

Typo in code

in Htmldom.php:

public function str_get_html($str, $lowercase = true, $forceTagsClosed = true, $target_charset = DEFAULT_TARGET_CHARSET, $stripRN = true, $defaultBRText = DEFAULT_BR_TEXT, $defaultSpanText = DEFAULT_SPAN_TEXT)
    {
        if (empty($str) || $strlen($str) > MAX_FILE_SIZE)
        {
            return false;
        }
        $this->load($str, $lowercase, $stripRN);
        return $this;
    }

$strlen should just be strlen

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.