2

I'm trying to redirect the user's click on a link to a telephone number through php like this:

//HTML
<a href="tele.php">

and the php:

<?php
header("Location: tel:+123456789");
exit;
?>

This works on newer mobile browsers but won't on the older ones in particular Nokia WAP2.0 browser. Any ideas, plaese?

jakedemus
  • 83
  • 2
  • 9

2 Answers2

2

I've found a solution after few trials.

I set up a third-level domain of my main domain: call.mydomain.it. In its docroot I placed an index.php file containing these lines:

<?php
if(isset($_GET['tel']) && $_GET['tel'] != "")
{
    $tel = $_GET['tel'];
    header("Location: tel://$tel");
}
die();
?>

So, when I load call.mydomain.it/?tel=00393331234567 the browser starts a call to the number passed as argument.

Further on, if you have to setup a web marketing campaign, you can shrink this url with this free tool

Hope having helped you

Mattia Merlini
  • 643
  • 1
  • 8
  • 24
0

Try wtai://wp/mc;xxxxxxxxx instead of tel:.

Romain
  • 12,679
  • 3
  • 41
  • 54
Waygood
  • 2,657
  • 2
  • 15
  • 16