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; }
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; }
The URL shortening service TinyURL.com provides an API for programmatically processing URL shortening requests through your own script. Continue reading “How to Dynamically Shorten URLs with TinyURL?”
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. Continue reading “How to Grab Youtube Video Thumbnail?”
This is a simple tip but most experienced PHP programmers don’t know that it even exists. Continue reading “How to Assign the Same Value to Multiple Variables?”