• The default language of any content posted is English.
    Do not create multi-accounts, you will be blocked! For more information about rules, limits, and more, visit the Help page.
    Found a dead link? Use the report button!
  • Information: Safety & Support
    Resources here are generally safe, but false positives may occur on Virustotal due to certain coding techniques. Exercise caution and test before use.
    Consider buying licenses to support developers. Your security is our priority.
PHP Auto Linker - Advanced Keyword Linking

PHP Auto Linker - Advanced Keyword Linking v1.05

Developer
DAEXT
php-auto-linker.jpg


PHP Auto Linker is a PHP class that allows you to automatically apply links on a HTML document.

This class is already in use in other products from our portfolio. In particular, it’s adopted to apply the automatic links in WordPress plugins with thousands of users, like Interlinks Manager.

How the class applies the automatic links​

This class uses PHP regular expressions to generate the links from a list of keywords and URLs provided by the user.

It’s worth noting that this class gives you total control over the algorithm used to apply the links. Specifically, you can configure a high number of options both at the class level and at the automatic link level to:
  • Limit the maximum number of automatic links to a specific number
  • Select between a case sensitive or a case insensitive search of the keyword
  • Add the Nofollow attribute on the link element
  • Set a custom title attribute on the link element
  • Open the links in the same tab or a new tab
  • Find only the occurrences of the keyword preceded or followed by a specific string
  • Configure specific word boundaries based on the particular context or language
  • Prioritize individual keywords over the others
We have also included other advanced features for the most demanding users. For example, you can:
  • Prevent the application of the automatic link on specific HTML elements
  • Improve the distribution of the automatic links with the “Random Prioritization” feature
  • Prevent the application of the automatic links that target the current URL
  • Limit the maximum number of automatic links based on the length of the provided string
  • Limit the maximum number of automatic links that target the same URL

How to use the class​

The simplest usage example of the class:

require_once( 'inc/class-daext-automatic-links.php' );
$automatic_links = new DaextAutomaticLinks();

echo $automatic_links->add_autolinks( '<p>Buy my book.</p>',
[
[
'keyword' => "book",
'url' => "https://example.com/"
]
]
);
The above example will output:

<p>Buy my <a href="https://example.com/">book</a>.</p>
This other script uses advanced options to:

  • Open the generate links on a new tab
  • Limit the number of automatic links to two
  • Protect specific tags
require_once( 'inc/class-daext-automatic-links.php' );
$automatic_links = new DaextAutomaticLinks();

$automatic_links->set_options(
[
'open_new_tab' => true,
'general_limit_amount' => 2,
'protected_tags' => [
'h1',
'h2',
'h3',
'h4',
'h5',
'h6',
'strong',
'pre',
'code'
]
]
);

$article = '<h2>iPhone 14 range</h2>';
$article .= '<p>The iPhone 14 is an obvious pick on our list.</p>';

echo $automatic_links->add_autolinks( $article,
[
[
'keyword' => "iPhone 14",
'url' => "https://example.com/iphone-14/"
]
]
);
The above example will output:

<h2>iPhone 14 range</h2><p>The <a target="_blank" href="https://example.com/iphone-14/">iPhone 14</a> is an obvious pick on our list.</p>
Note that more examples are available in the class demo and the plugin manual.
  • 05_example_5.png
    05_example_5.png
    27.2 KB · Views: 2
  • 04_example_4.png
    04_example_4.png
    25.7 KB · Views: 1
  • 03_example_3.png
    03_example_3.png
    34.5 KB · Views: 1
  • 02_example_2.png
    02_example_2.png
    34.4 KB · Views: 1
  • 01_example_1.png
    01_example_1.png
    25.6 KB · Views: 1
  • php-auto-linker.jpg
    php-auto-linker.jpg
    46.1 KB · Views: 1
  • Like
Reactions: raz0r
  • Version v1.05
  • Downloads 7
  • Views 60
  • Last Update
  • Rating 0.00 star(s) 0 ratings

More resources from appscart

Similar resources

Mingle SAAS - Social Auto Poster and Scheduler PHP Script raz0r
Mingle SAAS - Social Auto Poster & Scheduler PHP Script Codecanyon ID 29531150
0.00 star(s) 0 ratings
Downloads
451
Updated
Simple-Cloud-Mining-PHP + Coinpayments Auto Withdraw SmartyScript
Simple-Cloud-Mining-PHP + Coinpayments Auto Withdraw
0.00 star(s) 0 ratings
Downloads
32
Updated
66socialproof - Social Proof and FOMO Widgets Notifications (SAAS) PHP raz0r
Social Proof & FOMO Widgets Notifications (SAAS) | Codecanyon 24033812
5.00 star(s) 3 ratings
Downloads
515
Updated
66toolkit - Ultimate Web Tools System Php (SAAS) by 	AltumCode raz0r
Ultimate Web Tools System (SAAS) | 37787144
5.00 star(s) 3 ratings
Downloads
940
Updated
AccountGo SaaS - Accounting and Billing Php Tool FranklinGT
5.00 star(s) 1 ratings
Downloads
347
Updated
Top