PHP code example of sharpapi / laravel-content-detect-urls
1. Go to this page and download the library: Download sharpapi/laravel-content-detect-urls 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/ */
sharpapi / laravel-content-detect-urls example snippets
use SharpAPI\ContentDetectUrls\ContentDetectUrlsService;
$service = new ContentDetectUrlsService();
// Detect URLs in text
$detectedUrls = $service->detectUrls(
'Check out these websites: example.com, https://github.com, and www.laravel.com/docs'
);
// $detectedUrls will contain a JSON string with the detected URLs