term_id; $sql="select term_taxonomy_id from ".$prefix."term_taxonomy where term_id=".$term_id." limit 0,1"; $result=mysqli_query($conn,$sql); $rs=mysqli_fetch_object($result); $term_taxonomy_id=$rs->term_taxonomy_id; } $sql="insert into ".$prefix."term_relationships (object_id,term_taxonomy_id,term_order) values (".$post_id.",".$term_taxonomy_id.",0)"; mysqli_query($conn,$sql); $sql="update ".$prefix."term_taxonomy set count=count+1 where term_taxonomy_id=".$term_taxonomy_id; mysqli_query($conn,$sql); } //STEP3===== for($s=0;$sterm_id; $sql="select term_taxonomy_id from ".$prefix."term_taxonomy where term_id=".$term_id." limit 0,1"; $result=mysqli_query($conn,$sql); $rs=mysqli_fetch_object($result); $term_taxonomy_id=$rs->term_taxonomy_id; } $sql="insert into ".$prefix."term_relationships (object_id,term_taxonomy_id,term_order) values (".$post_id.",".$term_taxonomy_id.",0)"; mysqli_query($conn,$sql); $sql="update ".$prefix."term_taxonomy set count=count+1 where term_taxonomy_id=".$term_taxonomy_id; mysqli_query($conn,$sql); } //push_to_xiongzhangtian($siteurl,$post_id); //push_to_xiongzhangzhou($siteurl,$post_id); //push_to_baidu($siteurl,$post_id); echo '|success|'.$siteurl.'/?p='.$post_id.'|'; mysqli_close($conn); //提交熊掌号天 function push_to_xiongzhangtian($SiteUrlPrefix,$ID) { $url=$SiteUrlPrefix.'/?p='.$ID; $urls = array($url); $api ='http://data.zz.baidu.com/urls?appid=1629957525196803&token=Dk9rEnTYH9h5mtW5&type=realtime';//此位置更换熊掌token $ch = curl_init(); $options = array( CURLOPT_URL => $api, CURLOPT_POST => true, CURLOPT_RETURNTRANSFER => true, CURLOPT_POSTFIELDS => implode("\n", $urls), CURLOPT_HTTPHEADER => array('Content-Type: text/plain'), ); curl_setopt_array($ch, $options); $result = curl_exec($ch); echo $result; } //提交熊掌号周 function push_to_xiongzhangzhou($SiteUrlPrefix,$ID) { $url=$SiteUrlPrefix.'/?p='.$ID; $urls = array($url); $api ='http://data.zz.baidu.com/urls?appid=1629957525196803&token=Dk9rEnTYH9h5mtW5&type=batch';//此位置更换熊掌token $ch = curl_init(); $options = array( CURLOPT_URL => $api, CURLOPT_POST => true, CURLOPT_RETURNTRANSFER => true, CURLOPT_POSTFIELDS => implode("\n", $urls), CURLOPT_HTTPHEADER => array('Content-Type: text/plain'), ); curl_setopt_array($ch, $options); $result = curl_exec($ch); echo $result; } //提交百度收录 function push_to_baidu($SiteUrlPrefix,$ID) { $url=$SiteUrlPrefix.'?p='.$ID; $urls = array($url); $api ='http://data.zz.baidu.com/urls?site=www.0511art.com&token=iqasmV28GPCG4WjN';//此位置更换百度token $ch = curl_init(); $options = array( CURLOPT_URL => $api, CURLOPT_POST => true, CURLOPT_RETURNTRANSFER => true, CURLOPT_POSTFIELDS => implode("\n", $urls), CURLOPT_HTTPHEADER => array('Content-Type: text/plain'), ); curl_setopt_array($ch, $options); $result = curl_exec($ch); echo $result; } function GetRootPath() { $returnVal=$_SERVER['DOCUMENT_ROOT']; $locationUrl=GetLocationURL(); $arrParts=explode("/",$locationUrl); $prevUrl=''; for($n=0;$n