How to read XML document with xpath using dom4j library
You can create an xml document using SAXReader as given sample below.
We will use the below xml file to read in this example
How to remove query strings from URL using .htaccess
A query string is the stuff after the question mark in URLs.
Remove query string makes you URL more readable and easier to share on social media.
How To Generate tinyURLs in PHP
All you need is allow_url_fopen enabled in your php.ini and PHP version 4.3.0 or higher. If you don't know whether you have allow_url_fopen enabled, just run the function phpinfo(), which displays all of your PHP settings.
This line of code send a request to tinyurl.com with necessary parameters and you will get a tinyurl.com url of the current page returned.
This line of code send a request to tinyurl.com with necessary parameters and you will get a tinyurl.com url .PHP how to set a one-off variable
A one-off variable makes a predicate expression true or false only the first time it's evaluated, the same expression will be opposite false or true ever after. This is useful when there something needs to be done only when the same block of code is executed on the first time. Usually the code block is in a loop, you .