- Excel VBA 質問スレ Part36 [転載禁止]©2ch.net
667 :デフォルトの名無しさん[]:2015/05/06(水) 12:13:27.50 ID:h7IHpKC6 - Option Explicit
Private WithEvents Inet1 As Inet Private Const AppKey As String = "aqMBM5paukkx5FOVcSfisMTMj8I4Dm" Private Const HMKey As String = "CPGjWLXxFojVtO7tiu3Lrwm1yLqtk1" Private Function authenticate() As String Dim CT As String Dim message As String Dim HB As String Dim url As String Dim values As String Dim headers As String Dim data As String CT = "1234567890" message = AppKey + CT HB = hmac(HMKey, message) url = "https://api.2ch.net/v1/auth/"
|
- Excel VBA 質問スレ Part36 [転載禁止]©2ch.net
668 :デフォルトの名無しさん[sage]:2015/05/06(水) 12:14:34.73 ID:h7IHpKC6 - values = "ID=" & "" & "&" & _
"PW=" & "" & "&" & _ "kY=" & AppKey & "&" & _ "CT=" & CT & "&" & _ "HB=" & HB headers = "X-2ch-UA: JaneStyle/3.81" & vbCrLf & _ "User-Agent: Mozilla/3.0 (compatible; JaneStyle/3.81..)" & vbCrLf & _ "Content-Type: application/x-www-form-urlencoded" & vbCrLf & _ vbCrLf data = values Set Inet1 = New Inet With Inet1 .Execute url, "POST", data, headers Do While .StillExecuting DoEvents Loop .Cancel End With Set Inet1 = Nothing End Function
|
- Excel VBA 質問スレ Part36 [転載禁止]©2ch.net
669 :デフォルトの名無しさん[sage]:2015/05/06(水) 12:22:38.72 ID:h7IHpKC6 - >>667,668
http://pastebin.com/CdSrLEBj のコードをVBAに移植しようと考えています。 sidを取得する部分でエラーng (appkey incorrect length)”が 返ってきます。どの部分に不具合があるのかご指摘いただけると 幸いです。
|
- Excel VBA 質問スレ Part36 [転載禁止]©2ch.net
673 :デフォルトの名無しさん[sage]:2015/05/06(水) 13:46:22.39 ID:h7IHpKC6 - >>671
ありがとうございます。無事解決しました。
|