I'm not sure how to ask this but I am having a problem with output URL showing https//example.com
Below is my code, someone please i need assistance, I am trying to achieve https://example.com while I got https//example.com
Am i missing anything on the regex or something..?
Thanks.
shuffle($randurl);
$smtp_email = $smtp_user;
$smtp_user = explode("@", $smtp_user) [0];
$randurls = array_shift($randurl);
preg_match('@^(?:https://)?([^/]+)@i', $randurls, $matches);
$host = $matches[1];
$host = explode('.', $host);
$host = $host[0];
$email64 = base64_encode($email);
$base64url = base64_decode($randurls);
if ($redirect == 1)
{
$randurls = "$randurls?email=" . urlencode($email64) . "";
}
else if ($redirect == 2)
{
$randurls = "$randurls?a=" . urlencode($email64) . "";
}
else if ($redirect == 3)
{
$randurls = "$randurls?email=" . urlencode($email) . "";
https:://in this case. See what your pattern matches herehttps//example.com, instead ofhttps://example.com..Thanks for your. response