PHP code example of zyan / web-link

1. Go to this page and download the library: Download zyan/web-link 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/ */

    

zyan / web-link example snippets


use Zyan\WebLink\WebLink;

$link = new WebLink('http://www.dj97.com');

$link->externalLinks();

/*
Array
(
    [0] => Array
        (
            [name] => 水晶DJ APP下载
            [url] => http://www.djapp.com.cn/?f=down-97index
        )

    [1] => Array
        (
            [name] => 
            [url] => http://www.djapp.com.cn/?f=down-97index
        )

    [2] => Array
        (
            [name] => 听音乐
            [url] => http://www.lizhi.fm
        )

    [3] => Array
        (
            [name] => 嗨瑶音乐
            [url] => http://www.92kk.com
        )

    [4] => Array
        (
            [name] => 火影忍者
            [url] => http://www.narutom.com
        )
    ...
)
*/



$link->setHtml('http://www.baidu.com');
$link->externalLinks();
//...