regular expressions
Highlight text for search results in PHP
Useful code to highlight text occurences in search results or in a text. How to highlight text in a string…
How to add rel=”nofollow” to links with preg_replace()
Adding rel="nofollow" to external link is a good SEO practice.
Block junk emails, spammers and temporary emails
If you need an Email Validator Function, consider this version that includes also the check against common temporary mail services…
How many times a web link has been shared on Twitter
Twitter share button and Facebook share button are the most used buttons to share links on Internet. You can read…
get MySpace events with a PHP function
Here is a function to read the concerts for a myspace band page. This code retrieves the “shows page” for…
Php Function to resize video from YouTube and Vimeo
When you make a web application that let the user insert video embeds coming from YouTube or from Vimeo, or…
Parsing Flickr Feed with PHP tutorial
I’ve spent about 30 minutes to find a javascript embed to print out a custom thumbs list of flickr photos,…
PHP parse url, mailto, and also twitter’s usernames and arguments
This small function receive a text as input and returns an html text with links if the source text contains…
PHP to get twitter infos and avatar
I’ve just updated the Mini Bot Php Class with an improved version of the twitterInfo function, here is the code…
ASP equivalent to PHP strip_tags
I’ve found those functions around in the internet and I put them here just to remind how to strip tags…