PHP code example of nexuslinkservices / assets-finder
1. Go to this page and download the library: Download nexuslinkservices/assets-finder 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/ */
nexuslinkservices / assets-finder example snippets
use AssetsFinder\MediaParser;
$assetsFinder = new MediaParser;
$content = "First sample file http://www.mywebsite.com/firstsample.mp3 and second file is https://www.mywebsite.com/secondsample.mp4. This is the image link <img src='http://www.mywebsite.com/assets/images/sampleimage.jpg' alt='sample image' title='sample image'> and second image <img src='http://www.mywebsite.com/assets/images/sampleimage2.png' alt='test png image' title='test png image'>";
$result = $assetsFinder->FindMedia($content);