This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| curl -X POST -u <API USERNAME>:<API SECRET KEY> https://api.neverbounce.com/v3/access_token\ | |
| -d grant_type=client_credentials\ | |
| -d scope=basic+user |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Verifying that +mmollick is my blockchain ID. https://onename.com/mmollick |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * Shorten large numbers into abbreviations (i.e. 15,000 = 15K, 1,500 = 1.5K) | |
| * | |
| * @param int $number Number to shorten | |
| * @return String A number with a symbol | |
| */ | |
| function numberAbbreviation($number) { | |
| $abbrevs = array(12 => "T", 9 => "B", 6 => "M", 3 => "K", 0 => ""); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * | |
| * http://regex101.com/r/xT3wZ9/1 | |
| * | |
| */ | |
| $url = "http://www.neowin.net/forum/topic/1229911-i-need-a-reg-ex-for-urls/"; | |
| $regex = "/(^https?:\/\/?)?([w]{3}|[a-z0-9]+\.)?([a-z0-9]+)(\.[a-z\.]{2,6}+)(\/[a-z0-9\-\_\/]+)+(\.[a-z0-9]+)?(\?[a-z0-9\=\-\_\&\+]*)?/i"; | |
| $url_parts = preg_match($regex, $url); |
NewerOlder