火车头采集企业数据进destoon导入PHP文件

火车头采集14年前 (2010)发布 liyugang
76 0

保存为member.php。放在网站根目录下。。 GBK测试通过

采集到的数据库也传到根目录下

先调整对应数据库字段

/*
[Destoon B2B System] Copyright (c) 2009 Destoon.COM
This is NOT a freeware, use is subject to license.txt
*/
define('DT_NONUSER', true);
$moduleid = 2;
require 'common.inc.php';
require DT_ROOT.'/include/db_access.class.php';
require DT_ROOT.'/include/module.func.php';
require DT_ROOT.'/include/post.func.php';
require DT_ROOT.'/module/'.$module.'/'.$module.'.class.php';

$CATEGORY = cache_read('category-'.$moduleid.'.php');
$AREA = cache_read('area.php');
$do = new member;

$ac = new db_access;
$ac->connect(DT_ROOT.'/m.mdb', '', '', 'Content');

$result = $ac->query("SELECT * FROM Content");
while($ar = $ac->fetch_array($result)) {
$post = array();
$post['userid'] = $ar['ID'];
$post['username'] = $ar['公司ID'];
$post['passport'] = $ar['公司ID'];
$post['company'] = $ar['公司名称'];
$post['truename'] = $ar['联系人'];
$post['truename'] = $ar['联系人'];
$post['email'] = $ar['MAIL'];
$post['type'] = '企业单位';
$post['regyear'] = '1999';
$post['catid'] = '8258';
$post['areaid'] = '1';
$post['gender'] = '1';
$post['password'] = '114wtozzz';
$post['cpassword'] = '114wtozzz';
$post['groupid'] = 6;
//建立对应关系
if($do->add($post)) {
echo $ar['公司ID'].':发布成功
';
} else {
echo $ar['公司ID'].':'.$do->errmsg.'
';
}
}
?>

© 版权声明

相关文章

暂无评论

暂无评论...