PHP code example of piradoiv / linklord

1. Go to this page and download the library: Download piradoiv/linklord library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

piradoiv / linklord example snippets


# Require Composer autoloader
="http://www.example.com/">Example</a></body></html>';
$parser = new \PiradoIV\Html\LinkLord\Parser($html);
$links = $parser->getLinks();

foreach ($links as $node) {
  echo "{$node->anchorText}\n";
}

$node->isNoFollow;

$node->isImage;

$possibleMentions = array('www.example.com', 'www.anotherdomain.com');
$mentions = $parser->getMentions($possibleMentions);