⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 rss2sql_install.php

📁 RSS to SQL to store in Database
💻 PHP
字号:
<?php//// rss2sql.php Store RSS feeds into SQL Configuration//// Copyright 2006-2007 NotePage, Inc.// http://www.feedforall.com//// NotePage, Inc. grants registerd users of our FeedForAll and/or// FeedForAll Mac product(s) the right to install and use the// rss2sql.php script free of charge.// Please refer to the EULA included in the download for full license// terms and conditions.//// $Id: rss2sql_install.php,v 3.0 2007/04/16 14:23:04 housley Exp $//$config = Array();echo "<HTML>\n<HEAD></HEAD>\n<BODY bgcolor=\"#EEEEFF\">\n";if (isset($_POST["submit"])) {  if ($_SERVER['REQUEST_METHOD'] != "POST") {    exit;  }  $config["DBuser"] = $_POST["DBuser"];  $config["DBpassword"] = $_POST["DBpassword"];  $config["DBmachine"] = $_POST["DBmachine"];  $config["DBdatabase"] = $_POST["DBdatabase"];  $config["DBtype"] = $_POST["DBtype"];  $config["AdminUsername"] = $_POST["AdminUsername"];  $config["AdminPassword"] = $_POST["AdminPassword"];  echo "Copy between the dividers below and save as the configuration file.  It is recommened that you save the file as \"rss2sql_DBconfig.inc.php\", you can use other names, but that makes things more complex.  The file must end in \".php\", to be process properly and to prevent the contents of the file from being viewed by accessing the website.  You will need this filename in rss2sql.php?buildConfig<br>\n";  echo "<br>================= Start of file =================\n";  echo "<pre>\n";  echo "&lt;?php\n\n";  echo "\$config[\"DBuser\"]= \"".htmlentities($_POST["DBuser"])."\";\n";  echo "\$config[\"DBpassword\"] = \"".htmlentities($_POST["DBpassword"])."\";\n";  echo "\$config[\"DBmachine\"] = \"".htmlentities($_POST["DBmachine"])."\";\n";  echo "\$config[\"DBdatabase\"] = \"".htmlentities($_POST["DBdatabase"])."\";\n";  echo "\$config[\"DBtype\"] = \"$_POST[DBtype]\";\n";  echo "\n";  echo "\$config[\"AdminUsername\"] = \"".htmlentities($_POST["AdminUsername"])."\";\n";  echo "\$config[\"AdminPassword\"] = \"".htmlentities($_POST["AdminPassword"])."\";\n";  echo "\n";  echo "\n?&gt;\n";  echo "</pre>\n";  echo "================== End of file ==================<br><br>\n";}echo "<p>Fillin the following information and click \"Submit\" to create the database configuration file that will be used by rss2sql.php</p>\n";echo "<table width=\"100%\" border=\"0\">\n";echo "<FORM ACTION=\"$_SERVER[PHP_SELF]\" METHOD=\"POST\">\n";echo "<tr><th valign=\"top\">Username</th><td>The username to access your database.  The database will only be read from, so a username with read only access is ideal.<br>";echo "<INPUT TYPE=\"TEXT\" NAME=\"DBuser\" VALUE=\"";if (isset($config["DBuser"])) {  echo htmlentities($config["DBuser"]);}echo "\" SIZE=\"32\" MAXLENGTH=\"64\"></td></tr>\n";echo "<tr><th valign=\"top\">Password</th><td>The password, for the above username, to access the database<br>";echo "<INPUT TYPE=\"TEXT\" NAME=\"DBpassword\" VALUE=\"";if (isset($config["DBpassword"])) {  echo htmlentities($config["DBpassword"]);}echo "\" SIZE=\"32\" MAXLENGTH=\"64\"></td></tr>\n";echo "<tr><th valign=\"top\">Database Machine</th><td>The domain name of the machine your database is on.  If it is the same machine as your webserver then use \"localhost\".<br>";echo "<INPUT TYPE=\"TEXT\" NAME=\"DBmachine\" VALUE=\"";if (isset($config["DBmachine"])) {  echo htmlentities($config["DBmachine"]);}echo "\" SIZE=\"32\" MAXLENGTH=\"64\"></td></tr>\n";echo "<tr><th valign=\"top\">Database Name</th><td>The name of the database with your information.<br>";echo "<INPUT TYPE=\"TEXT\" NAME=\"DBdatabase\" VALUE=\"";if (isset($config["DBdatabase"])) {  echo htmlentities($config["DBdatabase"]);}echo "\" SIZE=\"32\" MAXLENGTH=\"64\"></td></tr>\n";echo "<tr><th valign=\"top\">DBtype</th><td>Is the databasy type that will be used.<br><select name=\"DBtype\">";echo "<option value=\"mysql\"";if (!isset($config["DBtype"])) {  $config["DBtype"] = "mysql";}if ($config["DBtype"] == "mysql") {  echo " selected";}echo ">MySQL</option>\n";echo "<option value=\"mssql\"";if ($config["DBtype"] == "mssql") {  echo " selected";}echo ">MS SQL</option>\n";echo "</select></td></tr>\n";echo "<tr><td colspan=\"2\"><hr></td></tr>\n";echo "<tr><th valign=\"top\">Admin Username</th><td>The username for accessing rss2sql_admin.php<br>";echo "<INPUT TYPE=\"TEXT\" NAME=\"AdminUsername\" VALUE=\"";if (isset($config["AdminUsername"])) {  echo htmlentities($config["AdminUsername"]);} else {  echo "rss2sql_Admin";}echo "\" SIZE=\"32\" MAXLENGTH=\"64\"></td></tr>\n";echo "<tr><th valign=\"top\">Admin Password</th><td>The password for accessing rss2sql_admin.php<br>";echo "<INPUT TYPE=\"TEXT\" NAME=\"AdminPassword\" VALUE=\"";if ((isset($config["AdminPassword"])) && (($config["AdminPassword"] != "") || ($config["AdminPassword"] != "password"))) {  echo htmlentities($config["AdminPassword"]);} else {  $pass = "";  mt_srand(time());  for ($i=0; $i < 10; $i++) {    $pass .= chr(intval(mt_rand(40,122)));  }  echo htmlentities($pass);}echo "\" SIZE=\"32\" MAXLENGTH=\"64\"></td></tr>\n";echo "<tr><td colspan=\"2\"><INPUT TYPE=\"SUBMIT\" NAME=\"submit\" VALUE=\"SUBMIT\"></td></tr>\n";echo "</FORM>\n";echo "</table>\n";echo "</BODY>\n</HTML>\n";?>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -