Monday, March 25, 2013

PHP Current URL

Usually, I use this code to get the current page full URL that is shown in the browser URL window. PHP current url without query string.

To get the current page URL, you just need to do this:
echo currentURL();

If you just want to get page name only, you can use the script below:
These code taken from: webcheatsheet . com/PHP/get_current_page_url.php
Continue ►

PHP + cURL RSS Parser

Using cURL (Client URL Library) is the best option that can be used when setting allow_url_fopen is set to off.
allow_url_fopen Off
When setting allow_url_fopen is set off, it will not be able to use fopen to open and read the Rss Feed from another URL. So how to outsmart?
Use PHP CURL, and the following code snippet to read the Rss Feed. Below is example of how to use the function above: Hopefully this PHP rss parser example helpful for you to create your own php rss reader.
Continue ►