找回密码

火车采集器软件交流官方论坛

搜索
火车采集器V9版免费下载火车浏览器 - 可视采集,万能群发,全自动脚本工具
查看: 1969|回复: 1

wordpress免登陆发布接口问题

[复制链接]
发表于 2017-9-4 22:53:59 | 显示全部楼层 |阅读模式
用了论坛上下的wordpress免登陆发布接口4.x版的,发布文章都正常,就是有磁力链接这种“magnet:?xt=urn:btih:”字样的,都会被删去,采集数据正常,通过发布接口就没有“magnet:?xt=urn:btih:”字样,怀疑是发布接口中字符转换造成的,求大神解答。
类似字符转换代码:出问题的主要是提交的post_content字段。
  1. function hm_strip_slashes($str){
  2. //if (get_magic_quotes_gpc()) return stripslashes($str);
  3. return $str;
  4. }
  5. function hm_strip_slashes_new($string, $force = 0) {
  6.         !defined('MAGIC_QUOTES_GPC') && define('MAGIC_QUOTES_GPC', get_magic_quotes_gpc());
  7.         if(!MAGIC_QUOTES_GPC || $force) {
  8.                 if(is_array($string)) {
  9.                         foreach($string as $key => $val) {
  10.                                 $string[$key] = daddslashes($val, $force);
  11.                         }
  12.                 } else {
  13.                         $string = addslashes($string);
  14.                 }
  15.         }
  16.         return $string;
  17. }
  18. function hm_do_save_post($post_detail)
  19. {
  20.     global $post_author,$post_ping,$post_status,$translate_slug,$autoAddCategory,$post_next;
  21.         extract($post_detail);

  22.     $post_title=trim(hm_strip_slashes($post_title));
  23.         $post_name=$post_title;
  24.         if($translate_slug) $post_name=hm_tranlate($post_name);
  25.         $post_name=sanitize_title( $post_name);
  26.         if( strlen($post_name) < 2 ) $post_name="";
  27.    
  28.     $post_content=hm_strip_slashes($post_content);
  29.    
  30.     $tags_input=str_replace("|||",",",$tags_input);
  31.         
  32.         if(isset($post_date) &&$post_date)
  33.   {
  34.         $post_date_gmt=$post_date;
  35.         $post_status='publish';
  36.   }
复制代码


发表于 2017-9-5 14:06:42 | 显示全部楼层
已经重新发你了
您需要登录后才可以回帖 登录 | 加入会员

本版积分规则

温馨提示:建议您联系官方定制服务,通过官方支付方式完成支付。您与其他非官方账号发生的交易,我方概不承担责任。网络有风险,交易需谨慎

QQ| 手机版|Archiver| 火车采集器官方站

Copyright © 2001-2013 Comsenz Inc.  Template by Comeings! All Rights Reserved.

Powered by Discuz! X3.4( 皖ICP备06000549 )

快速回复 返回顶部 返回列表