$from = $_GET['from']; $to = $_GET['to']; //by vitasar 13.03.15 change http to https on reslib $reslib_arr = explode(".",$to); $reslib = $reslib_arr[0]; $protocol = "http://"; $protocol_sec = "https://"; ($reslib == "reslib") ? $prot = $protocol_sec : $prot = $protocol; // ?>