-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexample.php
More file actions
53 lines (40 loc) · 1.55 KB
/
example.php
File metadata and controls
53 lines (40 loc) · 1.55 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
<?php
// Require the file with the function CleanURL
require('cleanUrl.php');
// Set charset to UTF-8
echo '<meta charset="UTF-8">';
print_r('<strong>English sample sentence</strong><br />');
$string = "I'm your function & I will convert your string 100%!";
print_r('<em>String:</em> ' . $string);
print_r('<br />');
print_r('<em>Result:</em> ' . cleanUrl($string));
print_r('<br /><br />');
print_r('<strong>Caps to lowecase</strong><br />');
$string = "THERE WILL BE NO CAPS HERE!";
print_r('<em>String:</em> ' . $string);
print_r('<br />');
print_r('<em>Result:</em> ' . cleanUrl($string));
print_r('<br /><br />');
print_r('<strong>Cyrillic alphabet characters</strong><br />');
$string = 'Фирма на клуч';
print_r('<em>String:</em> ' . $string);
print_r('<br />');
print_r('<em>Result:</em> ' . cleanUrl($string));
print_r('<br /><br />');
print_r('<strong>Accented characters</strong><br />');
$string = 'Fußgängerübergänge, Größenmaßstäbe, Größenordnungsmäßig';
print_r('<em>String:</em> ' . $string);
print_r('<br />');
print_r('<em>Result:</em> ' . cleanUrl($string));
print_r('<br /><br />');
print_r('<strong>Currency symbols</strong><br />');
$string = 'I have 100 € and 50 $';
print_r('<em>String:</em> ' . $string);
print_r('<br />');
print_r('<em>Result:</em> ' . cleanUrl($string));
print_r('<br /><br />');
print_r('<strong>Unsafe characters</strong><br />');
$string = 'No unsafe characters here %20 & + , // / \r\n \n';
print_r('<em>String:</em> ' . $string);
print_r('<br />');
print_r('<em>Result:</em> ' . cleanUrl($string));