Brad Dierking is an experienced programmer, open source software proponent and avid reader of everything related to web development. Brad leverages 10 years of experience in the web development space to solve complex problems not only functionally, but elegantly. Whether the need is to build something custom, integrate with something proprietary or to bridge the gap to something legacy, Brad …
Sep 7, 2011
Latest Tweets
PHP Functionalism
-
PHP Get File Extension
I see a lot of people providing examples of getting the file extension of a file in PHP using string manipulation techniques, splitting on the dot, etc and just wanted to share the way that I do it. Basically the php pathinfo() function will return the extension as one of its parameters, or only the [...]
-
Google URL Shortener API Example using PHP and CURL
URL shortening is a technique that substantially shortens a url in length by creating a new url that when accessed, redirects the user to the original url. Another use for url shortening might be to disguise the original url… I recently needed to generate shortened urls and decided to try out the Google URL Shortener [...]
-
Follow Redirect Return Final URL
If you want to scrape a link and follow the redirect(s) to get the final url, you can use the following php function. This will work to get what is behind the redirect of a tracking link, to see where a bit.ly or other shortened url resolves to, etc. function follow($url){ $ch = curl_init(); [...]
