我如何使用php登录instagram,以便我可以通过Web截取图表形式的URL?

问题描述 投票:0回答:1

我想通过网络剪贴一个instagram网址,这样我就可以获取发布帖子的用户。我知道首先要进入URL的网址,我需要登录instagram,但问题是我不知道如何登录。

$data = array(
    "username" => "*******",
    "password" => "******"
);

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://www.instagram.com/accounts/login/");
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($data));
curl_setopt($ch, CURLOPT_COOKIEJAR, 'cookie.txt');
$response = curl_exec($ch);
curl_close($ch);

echo $response; 
php instagram
1个回答
0
投票

您要的是违反Instagram条款和条件的:

https://help.instagram.com/1188470931252371

  1. 我们禁止抓取,抓取,缓存或以其他方式访问任何 通过自动方式(包括但不限于)在服务上提供内容 ,用户个人资料和照片(除非是标准结果) 搜索引擎协议或搜索引擎使用的技术 Instagram明确表示同意。
© www.soinside.com 2019 - 2024. All rights reserved.