承接 webscrapingapi/php-sdk 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

webscrapingapi/php-sdk

最新稳定版本:v1.0

Composer 安装命令:

composer require webscrapingapi/php-sdk

包简介

SDK for sending http requests written in php

README 文档

README

WebScrapingApi is an API that allows scraping websites while using rotating proxies to prevent bans. This SDK for PHP makes the usage of the API easier to implement in any project you have.

Installation

Run the following command in the main folder of your project:

composer require webscrapingapi/php-sdk

API Key

To use the API and the SDK you will need a API Key. You can get one by registering at WebScrapingAPI.

Usage

Using the SDK it's quite easy. An example of a GET call to the API is the following:

<?php
 namespace Examples {
    
 require('main.php');
 use WebScrapingApi\Client;
    
 $API_KEY = "YOUR_API_KEY_HERE"; // enter your api key here
    
 $client = new Client($API_KEY);
    
 $params = array(
     # API Parameters
     # Set to 0 (off, default) or 1 (on) depending on whether or not to render JavaScript on the target web page. JavaScript rendering is done by using a browser.
     "render_js" => 1,
     # Set datacenter (default) or residential depending on whether proxy type you want to use for your scraping request. Please note that a single residential proxy API request is counted as 25 API requests.
     "proxy_type" => "datacenter",
     # Using the auto_parser parameter, you can get the scraped site in JSON format.
     "auto_parser" => 1
    ); 
    
  print($client->get('https://bing.com', $params));
 
 }   

For more reference, you can check out multiple examples here here

For a better understanding of the parameters, please check out our documentation

统计信息

  • 总下载量: 18
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 2
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: Unknown
  • 更新时间: 2022-09-13

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固