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 (18 days ago) RSS 2.0 feedNot enough user ratingsTotal: 182 This week: 2All time: 8,204 This week: 316Up
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
Age: 32
All time rank: 286051 in Iran Iran
Week rank: 289 Up10 in Iran Iran Up
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:182
This week:2
All time:8,204
This week:316Up