Skip to content

Instantly share code, notes, and snippets.

View HossamYousef's full-sized avatar
🏠
Working from home

Hossam Youssef HossamYousef

🏠
Working from home
View GitHub Profile
@HossamYousef
HossamYousef / FormatSize.php
Created October 9, 2015 03:21
Get Format Size
<?php
/**
* @author Hossam Youssef <Hossam.mox@gmail.com.com>
* @copyright 2015 Hossam Youssef
* @license https://opensource.org/licenses/MIT
*
* MIT LICENSE
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
@HossamYousef
HossamYousef / RandomPassword.php
Created October 2, 2015 19:00
Generates a random Password
<?php
/**
* @author Hossam Youssef <Hossam.mox@gmail.com.com>
* @copyright 2015 Hossam Youssef
* @license https://opensource.org/licenses/MIT
*
* MIT LICENSE
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
@HossamYousef
HossamYousef / FormatSizeUnits.php
Created October 2, 2015 14:25
Get Format Size Units
<?php
/**
* @author Hossam Youssef <Hossam.mox@gmail.com.com>
* @copyright 2015 Hossam Youssef
* @license https://opensource.org/licenses/MIT
*
* MIT LICENSE
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
@HossamYousef
HossamYousef / MimeType.php
Created October 2, 2015 13:29
Get file mime type
<?php
/**
* @author Hossam Youssef <Hossam.mox@gmail.com.com>
* @copyright 2015 Hossam Youssef
* @license https://opensource.org/licenses/MIT
*
* MIT LICENSE
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
@HossamYousef
HossamYousef / GetFileExtension.php
Created October 2, 2015 13:28
Get File Extension
<?php
/**
* @author Hossam Youssef <Hossam.mox@gmail.com.com>
* @copyright 2015 Hossam Youssef
* @license https://opensource.org/licenses/MIT
*
* MIT LICENSE
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
@HossamYousef
HossamYousef / get_ip_address.php
Created September 20, 2014 13:37
IP addresses
<?php
/**
* @Author Hossam Youssef <hossam.mox@gmail.com>
*
* Retrieves the best guess of the client's actual IP address.
* Takes into account numerous HTTP proxy headers due to variations
* in how different ISPs handle IP addresses in headers between hops.
*/
function get_ip_address() {
// check for shared internet/ISP IP