Share your repls and programming experiences

← Back to all posts
http => https
mar28t (0)
function normalizeUrl($url)
{
  $urls = strpos($url, 'http://');
    if ($urls === false)
      {
        $url = 'https://' . $url;       
      }
    else 
      {
        $trans = array("p" => "ps");
        $url = strtr($url, $trans);
      }         
  return  $url;
}