Dzhuneyt Ahmed
Archive for November 2011
← Go back to homepage
Get the Current URL of Page with PHP
This simple snippet of code will help you get the full URL of the currently viewed page. function getUrl(){ $domain = $\_SERVER\[‘HTTP\_HOST’\]; $url = “http://” . $domain . $\_SERVER\[‘REQUEST\_URI’\]; return $url; }
How to Dynamically Shorten URLs with TinyURL?
The URL shortening service TinyURL.com provides an API for programmatically processing URL shortening requests through your own script.
How to Grab Youtube Video Thumbnail?
Getting the thumbnail of a Youtube video through it’s ID is not that hard. You just have to transform the URL a little bit to get a high quality JPG file, used as a main thumbnail through Youtube.com.
How to Assign the Same Value to Multiple Variables?
This is a simple tip but most experienced PHP programmers don’t know that it even exists.
← Go back to homepage