Follow along with the video below to see how to install our site as a web app on your home screen.
Бележка: This feature may not be available in some browsers.
аз това го знам, но мисълта ми е друга ......... как да го записва в базата данни?porostorm каза:http://web-tourist.net/login/login/view.php?st=472
<?php
$link=$_GET['link'];
mysql_connect($server, $dbusername, $dbpassword)or die("Сайтът не може да се свърже към базата данни");
@mysql_select_db($db_name) or die("Грешна база данни");
mysql_query ("UPDATE linkove SET count=count+1 WHERE link='$link'");
$ok = mysql_query($query);
if(!$ok){
echo "<META HTTP-EQUIV=\"refresh\" CONTENT=\"0; URL=$link\">";
}else{
echo "Възникна грешка";
}
};
?>
<?
// MySQL server hostname
$dbhost = "localhost";
// MySQL server username
$dbuser = "";
// MySQL server password
$dbpasswd = "";
// MySQL server connect
$db=mysql_connect("$dbhost","$dbuser","$dbpasswd");
// MySQL database name
$db_name="";
mysql_select_db($db_name,$db);
//mysql table setup: (run this)
/* CREATE TABLE download (id tinyint(4) DEFAULT '0' NOT NULL auto_increment, count int(11) DEFAULT '0' NOT NULL, url varchar(255) NOT NULL, PRIMARY KEY (id)); */
/* Your link should be formed with "download.php?id=xx where xx is what id is set up for the file */
// Ready for this? It's a HUGE script!
// Update the download count
$query=mysql_query("update download set count=count+1 where id='$id'",$db);
//
$getfwd=mysql_query("select url from download where id='$id'",$db);
$get_url=mysql_fetch_array($getfwd);
$url=$get_url[url];
// Go to the file aready!
header("Location: $url");
?>