PHP Classes
elePHPant
Icontem

PHP Slug Generator: Create a slug text for a URL from another text

Recommend this page to a friend!
  Info   View files Example   View files View files (5)   DownloadInstall with Composer Download .zip   Reputation   Support forum (1)   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2018-01-04 (13 hours ago) RSS 2.0 feedNot enough user ratingsTotal: 174 This week: 10All time: 8,257 This week: 43Up
Version License PHP version Categories
php-slugit 0.5MIT/X Consortium ...5PHP 5, Text processing, SEO
Description Author

This class can create a slug text for a URL from another text.

It takes a given text string and processes it to generate a slug text only with plain ASCII text characters that can be used in URLs that are readable and friendly for the users.

The class replaces all spaces by dashes, and transliterate letters with accents and cedillas to the corresponding characters in ASCII.

  Performance   Level  
Name: afshin akhgar <contact>
Classes: 3 packages by
Country: Iran Iran
Innovation award
Innovation award
Nominee: 1x

Details

php-slugit

create url slug from a text and replace special character

Install

composer install
Direct install from composer
composer require afshinpersian/phpslugger

Include it via Composer Autoloader

require __DIR__ . '/vendor/autoload.php';
use PhpSlugger\PhpSlugger;

$phpSlugger = new PhpSlugger();
echo $phpSlugger->slugit('? ? $ Þ ?  I am A web Developer'); // delta-euro-dollor-l-i-am-a-web-developer

support

  Files folder image Files  
File Role Description
Files folder imagesrc (1 file)
Accessible without login Plain text file composer.json Data Auxiliary data
Accessible without login Plain text file index.php Example Example script
Accessible without login Plain text file LICENSE Lic. License text
Accessible without login Plain text file README.md Doc. Documentation

  Files folder image Files  /  src  
File Role Description
  Plain text file PhpSlugger.php Class Class source

 Version Control Unique User Downloads Download Rankings  
 100%
Total:174
This week:10
All time:8,257
This week:43Up