2012-11-25 17:53:15 +01:00
|
|
|
<!-- -*- mode: sgml; -*- -->
|
2011-05-06 15:49:43 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
// script to work around URLs with custom schemes not being clickable in
|
|
|
|
// Android's SMS app. It runs on my server and SMS messages hold links to it
|
|
|
|
// that it then redirects to the passed-in scheme.
|
|
|
|
|
|
|
|
$scheme = "newxwgame";
|
|
|
|
$host = "10.0.2.2";
|
|
|
|
$lang = $_REQUEST["lang"];
|
|
|
|
$room = $_REQUEST["room"];
|
2011-07-01 03:22:42 +02:00
|
|
|
$np = $_REQUEST["np"];
|
2011-12-21 02:14:21 +01:00
|
|
|
$id = $_REQUEST["id"];
|
2012-11-25 17:53:15 +01:00
|
|
|
$wl = $_REQUEST["wl"];
|
2011-12-21 02:14:21 +01:00
|
|
|
|
|
|
|
$content = "0; url=$scheme://$host?room=$room&lang=$lang&np=$np";
|
|
|
|
if ( $id != "" ) {
|
|
|
|
$content .= "&id=$id";
|
|
|
|
}
|
2012-11-25 17:53:15 +01:00
|
|
|
if ( $wl != "" ) {
|
|
|
|
$content .= "&wl=$wl";
|
|
|
|
}
|
2011-05-06 15:49:43 +02:00
|
|
|
|
|
|
|
print <<<EOF
|
|
|
|
|
|
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
|
|
|
<html>
|
|
|
|
<head>
|
2012-03-31 19:03:14 +02:00
|
|
|
<link rel="stylesheet" type="text/css" href="/xw4mobile.css" />
|
2011-05-06 15:49:43 +02:00
|
|
|
<title>Crosswords SMS redirect</title>
|
2011-06-10 03:30:59 +02:00
|
|
|
<meta http-equiv="REFRESH"
|
2011-12-21 02:14:21 +01:00
|
|
|
content="$content">
|
2011-05-06 15:49:43 +02:00
|
|
|
</head>
|
|
|
|
<body>
|
2011-07-15 03:47:45 +02:00
|
|
|
|
|
|
|
<div align="center">
|
|
|
|
<img src="./icon48x48.png">
|
|
|
|
|
2011-06-10 03:30:59 +02:00
|
|
|
<p>redirecting to Crosswords....</p>
|
|
|
|
|
2012-11-25 17:53:15 +01:00
|
|
|
<p>This page is meant to be viewed (briefly) on your Android
|
|
|
|
device after which Crosswords should launch.
|
|
|
|
</p>
|
|
|
|
<p>If this fails it's probably because you don't have a new enough
|
|
|
|
version of Crosswords installed. Or because your browser does
|
|
|
|
not allow URL redirects.
|
2011-07-15 03:47:45 +02:00
|
|
|
</p>
|
|
|
|
|
2012-11-25 17:53:15 +01:00
|
|
|
<img src="./icon48x48.png">
|
2011-07-15 03:47:45 +02:00
|
|
|
</div>
|
2011-06-10 03:30:59 +02:00
|
|
|
</body>
|
|
|
|
|
|
|
|
</html>
|
2011-05-06 15:49:43 +02:00
|
|
|
|
|
|
|
EOF;
|
2011-07-14 15:42:37 +02:00
|
|
|
|
2011-05-06 15:49:43 +02:00
|
|
|
?>
|