User Friendly Urls Snippets


04 October, 2012   

Turn a string into a readable url

Example htaccess snippets to remove File Extention from URLs

02 June, 2012   

This code removes all special characters from the given URL and make it SEO friendly.

Convert a string of text and ad hyperlinks to all the URLs. We loop through each URL and add a hyperlink

Removes an item from the page, without affecting page flow or causing scrollbars. Much better than display: none; or even visibility: hidden;

Apache Code example for blocking based on User-Agent Header

The following are some useful functions to build URLs within a CGI script, for example to send a HTTP redirection header

You can use a url shortener with Twitter such as tinyurl.com

20 April, 2013   

You can create your own Exceptions in PL/SQL

The below snippet will create a MySQL user and grant them all permissions on the given database.

08 June, 2011   

Did you know that search engine crawlers think that 'www.yoursite.com' and 'yoursite.com' are two different websites!? We need to help the crawlers out and tell them that the two URLs are the same. We can do this with a 301 (moved permanently) redirect. The code below will redirect requests for 'yoursite.com' to 'www.yoursite.com .

15 November, 2011   

Showing how to read data (an integer) from user.

Example: There is a table, 'user', with a column, 'clear', containing values such as: `clear \'animal\' \'pass'\ ` and we would like to retrieve 'animal' and 'pass' ( without the pre & post \' )

24 July, 2013   

An example of how to use the mysql_real_escape_string

01 October, 2013   

This class has lots of common functionality built right into it. It also supports Mysql and Sphinx.

09 July, 2013   

Show user's IP Address using a few lines of code, Place the code where you want the IP address to appear:

Detect Javascript On/Off, With Notification: If JavaScript is on the user gets a welcome message. If off, the user is instructed to turn it on.

16 February, 2012   

ASP code to ban user based on their IP address

Change Date from dd/mm/yyyy to yyyy-dd-mm

22 January, 2011   

The example here is if you had a form on a website that when submitted, needed to use that information to go to a special URL where the login information was all appeneded to the URL. You could have the form post with method GET, but that is limited to the typical ?variable=foo&variable2=bar format.