找回密码

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

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

百度短链插件有偿求助

[复制链接]
发表于 2019-4-12 10:37:35 | 显示全部楼层 |阅读模式
<?php
    $host = 'https://dwz.cn';
    $path = '/admin/v2/create';
    $url = $host . $path;
    $method = 'POST';
    $content_type = 'application/json';

    // TODO: 设置Token
    $token = '[color=rgba(0, 0, 0, 0.65)]65d654b71764bec225f50794601122d9';

    // TODO:设置待注册长网址
    $bodys = array('url'=>'你的长网址');

    // 配置headers
    $headers = array('Content-Type:'.$content_type, 'Token:'.$token);

    // 创建连接
    $curl = curl_init($url);
    curl_setopt($curl, CURLOPT_CUSTOMREQUEST, $method);
    curl_setopt($curl, CURLOPT_HTTPHEADER, $headers);
    curl_setopt($curl, CURLOPT_FAILONERROR, false);
    curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($curl, CURLOPT_HEADER, false);
    curl_setopt($curl, CURLOPT_POST, true);
    curl_setopt($curl, CURLOPT_POSTFIELDS, json_encode($bodys));

    // 发送请求
    $response = curl_exec($curl);
    curl_close($curl);

    // 读取响应
    var_dump($response);
    ?>

有偿求助次代码如何写成火车头插件

您需要登录后才可以回帖 登录 | 加入会员

本版积分规则

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

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

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

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

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