我想通过网络剪贴一个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;
您要的是违反Instagram条款和条件的:
https://help.instagram.com/1188470931252371
- 我们禁止抓取,抓取,缓存或以其他方式访问任何 通过自动方式(包括但不限于)在服务上提供内容 ,用户个人资料和照片(除非是标准结果) 搜索引擎协议或搜索引擎使用的技术 Instagram明确表示同意。