INSERT INTO `dede_arcatt` VALUES('9','y','原创'); alter table `dede_archives` modify `flag` set('c','h','p','f','s','j','a','b','y') default NULL; |
if($artUrl=='') { $artUrl = $cfg_phpurl."/view.php?aid=$id"; }else{ $aurls[]='http://'.$cfg_baiduhost.'/'.$artUrl; if(strpos($flag,'y') !== false) { $api = 'http://data.zz.baidu.com/urls?site='.$cfg_baiduhost.'&token='.$cfg_badutoken.'&type=original'; } else { $api = 'http://data.zz.baidu.com/urls?site='.$cfg_baiduhost.'&token='.$cfg_badutoken; } $ch = curl_init(); $options = array( CURLOPT_URL => $api, CURLOPT_POST => true, CURLOPT_RETURNTRANSFER => true, CURLOPT_POSTFIELDS => implode("\n", $aurls), CURLOPT_HTTPHEADER => array('Content-Type: text/plain'), ); curl_setopt_array($ch, $options); $result = curl_exec($ch); } |