<?php
/*Check URL weather SSL or not*/
$url = “https://twitter.com/”;
echo $type = preg_match( ‘|^https ?://|’, $url ) ? ‘url with SSL’ : ‘url without SSL’;
echo ‘<br>’;
echo $new_url = urlencode( stripslashes( $url ));
echo ‘<br>’;
echo $new_url = urldecode( stripslashes( $url ));
?>