$access_token , 'action' => 'follow' , ) ; // ã¢ã¤ãã ãã¼ã¿ãJSONå½¢å¼ã§åå¾ãã (CURLã使ç¨) $curl = curl_init() ; // ãªãã·ã§ã³ã®ã»ãã curl_setopt( $curl , CURLOPT_URL , $request_url ) ; curl_setopt( $curl , CURLOPT_HEADER, 1 ) ; curl_setopt( $curl , CURLOPT_CUSTOMREQUEST , 'POST' ) ; // ã¡ã½ãã curl_setopt( $curl , CURLOPT_SSL_VERIFYPEER , false ) ; // 証ææ¸ã®æ¤è¨¼ãè¡ããªã curl_setopt( $curl , CURLOPT_RETURNTRANSFER , true ) ; // curl_execã®çµæãæååã§è¿ã curl_setopt( $curl , CURLOPT_POSTFIELDS , http_build_query( $params ) ) ; // ãªã¯ã¨ã¹ããã㣠curl_setopt( $curl , CURLOPT_TIMEOUT , 5 ) ; // ã¿ã¤ã ã¢ã¦ãã®ç§æ° // å®è¡ $res1 = curl_exec( $curl ) ; $res2 = curl_getinfo( $curl ) ; // çµäº curl_close( $curl ) ; // åå¾ãããã¼ã¿ $json = substr( $res1, $res2['header_size'] ) ; // åå¾ãããã¼ã¿(JSONãªã©) $header = substr( $res1, 0, $res2['header_size'] ) ; // ã¬ã¹ãã³ã¹ãããã¼ (æ¤è¨¼ã«å©ç¨ãããå ´åã«ã©ãã) // HTMLç¨ $html = '' ; // JSONãã¼ã¿ããªãã¸ã§ã¯ãå½¢å¼ã«å¤æãã $obj = json_decode( $json ) ; // HTMLãä½æ $html .= '
ãã¼ã¿ãåå¾ã§ãã¾ããã§ããâ¦ãè¨å®ãå確èªãã¦ä¸ããã
' ; } // åå¾ãããã¼ã¿ $html .= 'ä¸è¨ã®ãã¼ã¿ãåå¾ã§ãã¾ããã
' ; $html .= 'ãã®ã¢ããªã±ã¼ã·ã§ã³ã¨ã®é£æºã¯ãä¸è¨è¨å®ãã¼ã¸ã§è§£é¤ãããã¨ãã§ãã¾ãã
' ; $html .= 'https://instagram.com/accounts/manage_access/
' ; ?>