Skip to content

Latest commit

 

History

History
43 lines (40 loc) · 851 Bytes

HELPER.md

File metadata and controls

43 lines (40 loc) · 851 Bytes

LIST HELPER

domain_helper.php

Fungsi get_domain :

get_domain($url)
  • Parameters full URL: $url.
  • Returns: domain.
  • Return type: string.
  • Contoh :
<?php echo get_domain('http://github.com') ?>

Maka akan menghasilkan github.com.

uri_helper.php

Fungsi setUri :

setUri($str)
  • @param string $str
  • @return void
  • Contoh :
<?php echo setUri('Lorem ipsum dolor sit amet.') ?>

Maka akan menghasilkan lorem-ipsum-dolor-sit-amet.

base64_helper.php

Fungsi base64ToImage :

base64ToImage($str, $width, $height)
  • @param string $str (mandatory)
  • @param int $width & $height (optional)
  • @return image in tag <img/>
  • Contoh :
<?php echo base64ToImage('iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHL.....') ?>

Maka akan menghasilkan <img/>.