此网址也是浏览器,但代码如下:
$insta_id = $ret->users[0]->user->pk;
$link1 = "https://www.instagram.com/graphql/query/?query_hash=42323d64886122307be10013ad2dcc44&variables=%7B%22id%22:%22".$insta_id."%22,%22first%22:12,%22after%22:%22AQDea0aZ27W349lmEWRcuh9xz7sO2Elo-_RDymqEMzT85he8dFwkrV4lbKlii9z7AkWPEbLx_txFKKbHeuotw9c4fY40B-Mm-lF7sfWtq8PUfQ%22%7D";
$response1 = file_get_contents($link1);
在调用我的函数之前我得到的是:
Message: file_get_contents(https://www.instagram.com/graphql/query/?query_hash=42323d64886122307be10013ad2dcc44&variables=%7B%22id%22:%22492948834%22,%22first%22:12,%22after%22:%22AQDea0aZ27W349lmEWRcuh9xz7sO2Elo-_RDymqEMzT85he8dFwkrV4lbKlii9z7AkWPEbLx_txFKKbHeuotw9c4fY40B-Mm-lF7sfWtq8PUfQ%22%7D): failed to open stream: HTTP request failed! HTTP/1.1 403 Forbidden
任何想法如何解决这个问题?非常感谢