$filter=包容的洋葱;
if ! empty$mail_brand ) ) }
$ filter [ ‘ MX.brand _ id ‘ ]=intval $ mail _ brand );
}
if ! empty$contacttool_brand ) }{
$ filter [ ‘ contact tool.brand _ id ‘ ]=intval $ contact tool _ brand;
}
if $ MX _ switch _ title==20|) $province ) }
$ filter [ ‘ www title ‘ ]=[ ‘ $ ne ‘=null ];
}
//网站标题
if ! empty$wwwtitle ) )
$ filter [ ‘ www title ‘ ]=new\MongoDB\bson\regex ‘ .快乐的钻石{$wwwtitle} ) .快乐的钻石,ykddg;
}
仅限//MX的周xsd ds/pif $ MX _ on _ switch==20|| province ) ) ) ) ) ) ) ) ) ) ) )
$filter[‘mx’]=[‘$exists’=true];
}
//mx模糊检查xsdds/p if ! empty$MX_vague_check ) }{
$ filter [ ‘ MX.MX ‘ ]=new\MongoDB\bson\regex ‘ .快乐钻石{$mx_vague_check} ) .快乐钻石),ykddg
}
//如果没有传达省里
ifempty ) $province ) }
$province=’shandong ‘;
}
try {
$ options _ base=[ ‘ connecttimeoutms ‘=500000,’ socketTimeoutMS’=500000];
$ manager=new\MongoDB\driver\manager c MongoDB _ auth _ URL )、$options_base );
//$读取首选项=$ manager-getreadpreference ;
//$ server=$ manager-selectserver $ read preference );
$coll=c’default_db ‘ ).’.’ $province;
$options=[
‘ projection’=[‘createdate’=0,
‘ expiresdate’=0,
‘ registrant_city’=0,
‘ registrant_street’=0,
‘ registrant_state’=0,
‘更新日期’=0,
‘ whoisserver_id’=0,
‘ registrar_name_id’=0,
‘ id’=0,
]、
];
//gsdmp记录总数
$commands=[
‘ count’=$province,
‘ query’=$filter
];
$ command=new\MongoDB\driver\command $ commands;
$ cursor=$ manager-execute command ‘ MX manage ‘,$command );
$info=$cursor-toArray ;
$count=$info[0]-n;
$ query=new\MongoDB\driver\query $ filter,$options );
$ rows=$ manager-execute query $ coll,$query );
$info=包容的洋葱;
Foreach$rowsas$document ) {
$ doc=阵列) $document;
$doc[‘_id’] 字符串) $doc[‘_id’];
$ doc [ ‘ mail _ brand _ name ‘ ]=$ doc [ ‘ MX ‘ ]-brand _ name;
$doc[‘mail_mx’]=$doc[‘mx’]-mx? ‘ ‘;
$ doc [ ‘ contact tool _ brand _ name ‘ ]=$ doc [ ‘ contact tool ‘ ]-brand _ name;
$doc[‘mx_changetime’]=! $doc[‘mx_changetime’] ‘?’ ‘ : date’Y-m-d H:i ‘,$doc[‘mx_changetime’] );
$ doc [ ‘ contact tool _ change time ‘ ]=! $doc[‘contacttool_changetime’] ‘?’ :日期y-m-DH : I )、$doc )、contacttool_changetime );
unset$doc[‘mx’];
unset $ doc [ ‘接触工具’ ];
$info包容的洋葱=$doc;
}
} catch MongoDB 驱动程序) exception$e ) )
echo $e-getMessage )、’\n ‘;
退出;
}