$access_token , ) ; // IPã¢ãã¬ã¹ãæ±ãã $ip = gethostbyname( 'syncer.jp' ) ; // ç½²åã®ä½æ $signature = hash_hmac( 'sha256' , $ip , $client_secret , false ) ; // ãããã¼ã®å¤ã®ä½æ $request_header = join( '|' , array( $ip , $signature ) ) ; // ã¢ã¤ãã ãã¼ã¿ã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_HTTPHEADER , array( 'X-Insta-Forwarded-For: ' . $request_header ) ) ; // ãããã¼ 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 .= '