找回密码

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

搜索
火车采集器V9版免费下载火车浏览器 - 可视采集,万能群发,全自动脚本工具
楼主: 孤魂

【孤魂作品】WordPress采集发布接口 免费版 V1.0

[复制链接]
发表于 2016-10-25 14:20:46 | 显示全部楼层

给力,支持一下。
发表于 2016-11-15 13:29:43 | 显示全部楼层
<?php
// 此为Wordpress免费版发布接口,只可以发布标题,内容,TAG
// 需要定时发布,自定义字段,发布回复的朋友,可以购买付费版本:http://www.kalvin.cn/article/locoyspider-wordpress-interface/

// 加载接口所必需的文件
@header('Content-Type: text/html; charset=UTF-8');
require('./wp-load.php');
require_once(ABSPATH . 'wp-admin/includes/admin.php');
@extract($_REQUEST,EXTR_OVERWRITE);

// 刷新分类列表
if (empty($post_title)) {
        wp_dropdown_categories(array(
                'hide_empty' => 0,
                'hide_if_empty' => false,
                'taxonomy' => 'category',
                'name' => 'parent',
                'orderby' => 'name',
                'hierarchical' => true,
                'show_option_none' => __('None'))
        );
        exit();
}

$post_time =  time() ;

// 初始化发贴信息
$post_info = array(
        'post_status' => 'publish',
        'post_type' => 'post',
        'post_author' => 1,
        'ping_status' => get_option( 'default_ping_status' ),
        'comment_status' => get_option( 'default_comment_status' ),
        'post_pingback' => get_option( 'default_pingback_flag' ),
        'post_parent' => 0,
        'menu_order' => 0,
        'to_ping' => '',
        'pinged' => '',
        'post_password' => '',
        'guid' => '',
        'post_content_filtered' => '',
        'post_excerpt' => $post_excerpt,
        'import_id' => 0,
        'post_content' => $post_content,
        'post_title' => $post_title,
        'post_category' => array($post_category_id),
        'post_name' => trim($post_name),
        'post_date_gmt' => get_gmt_from_date(gmdate('Y-m-d H:i:s', $post_time + ( get_option( 'gmt_offset' ) * 3600 ))),
        'post_date' => gmdate('Y-m-d H:i:s', $post_time + ( get_option( 'gmt_offset' ) * 3600 )),
        'tags_input' => array_unique(array_filter(explode(',', $tags))),
);

// 发布文章
$pid = wp_insert_post($post_info);
if ($pid) {
        echo "[OK] $pid Ok";
} else {
        exit('error');
}
?>
        
发表于 2016-11-30 14:00:14 | 显示全部楼层
111111111111111111
发表于 2016-12-3 17:30:24 | 显示全部楼层
是什么版本的
发表于 2017-5-24 11:30:30 | 显示全部楼层
这么久了,还能用吗
发表于 2017-5-26 07:51:05 | 显示全部楼层
想要看看是什麼
发表于 2017-6-2 04:00:00 | 显示全部楼层
发布接口564564562531562发布接口
发表于 2017-8-6 09:58:40 | 显示全部楼层
必须的支持一下
发表于 2017-9-16 21:23:46 | 显示全部楼层
插件需要安装在WordPress内么?
您需要登录后才可以回帖 登录 | 加入会员

本版积分规则

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

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

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

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

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