Ec (2); & nbsp; $ linkmssql_connect (& quot; 127.0.0.1 & quot;, & quot; sa & quot;, & quot; sa & quot;) ordie (& quot; cantconnectsqlserver & quot;); & nbsp; mssql_select_db (& quot; cheng & quot;, $ link) script ec (2); script
$ Link = mssql_connect ("127.0.0.1", "sa", "sa") or die ("Can't connect SQL server ");
Mssql_select_db ("cheng", $ link) or die ("Select database failure ");
Mysql tutorial _ connect ('localhost', 'root', 'root') or die ('database tutorial server cannot be connected ');
Mysql_select_db ('loupan ') or die ('error ');
Mysql_query ("set Names 'gb2312 '");
$ Ms_ SQL = "Select * from sony_z2800 ";
$ Ms_query = mssql_query ($ ms_ SQL) or die ('20140901 ');
$ Typeid = 23;
$ Write = '';
$ Sj = '';
$ Sjzt = '';
While ($ ms_rs = mssql_fetch_array ($ ms_query ))
{
$ Filetype = $ ms_rs [8];
$ Language = $ ms_rs [6];
$ OS = $ ms_rs [10];
$ Softsize = $ ms_rs [7];
$ Softlinks = mysql_escape_string ("{dede: link islocal = '1' text = 'thunder download'}". $ ms_rs [11]. "{/dede: link }");
$ Title = mysql_escape_string (mb_convert_encoding ($ ms_rs [3], 'gbk', 'gb2312 '));
$ Click = $ ms_rs [9];
If (! Is_numeric ($ click ))
{
$ Click = mt_rand (100,1000 );
}
$ Litpic = mysql_escape_string (str_replace ('"/>','', str_replace ('$ desciption = "";
$ Introduce = '';
// Die ($ desciption );
$ Addsoft = "Insert into _addonsoft (typeid, filetype, language, softtype, accredit,
OS, softrank, officialUrl, officialDemo, softsize, softlinks, introduce, templet, userip, redirecturl )";
$ Addsoft. = "values
('$ Typeid',' $ filetype', '$ language', '','', '$ OS', '3 ','','', '$ softsize ','". $ softlinks. "',' $ introduce ',', '202. 103.69.94 ','')";
Mysql_query ($ addsoft) or die ('addsoft '. $ addsoft. mysql_error ());
$ Newid = mysql_insert_id ();
$ Temp_title = $ title. '-'. $ sj. '-'. $ language;
$ Seo = $ OS. $ sj. $ sjzt;
Keywords = $ OS. ','. $ sj. ','. $ sjzt. ','. $ title. ','. $ language
$ Archives = "Insert into into_archives
(Id, typeid, typeid2, sortrank, flag, ismake, channel, arcrank, click, money, title, litpic, writer, source, pubdate, senddate, mid, dutyadmin
, Description, keywords )";
$ Archives. = "values
('$ Newid',' $ typeid', '0', '000000', 'P', '1', '3', '0', '$ click ', '0', '$ temp_title', '$ litpic', '$ write',' not
Zhi', '123', '123', 1255070897, '$ desciption', '$ keyword ')";
Mysql_query ($ archives) or die ('archivees'. $ temp_title. '|'. $ archives. mysql_error ());
$ Arctiny = "Insert into _arctiny (id, typeid, typeid2, arcrank, channel, senddate, sortrank, mid) values
($ Newid, $ typeid, 1255070897, 3, '000000', '000000', 1 )";
Mysql_query ($ arctiny) or die ('arctiny'. $ arctiny. mysql_error ());
}
Echo 'success ';
Original site reprinted with the source www.111cn.net