sukendn Posted April 24, 2016 Share Posted April 24, 2016 I'm trying to send IP WAN on Google SpreadSheets https://docs.google.com/spreadsheets/d/1OBhzEhjER6CbHp_rC3ohA59AJFJDOYnZEGEKOyen5UA/edit. I have created ClientID and ClientSecret to use Google Spreadsheets API : https://console.developers.google.com This is the code get WAN IP #include <_HttpRequest.au3> $_client_id = '' $_client_secret = '' _SetCell_SheetGoogle(3, 2, 123456, '1OBhzEhjER6CbHp_rC3ohA59AJFJDOYnZEGEKOyen5UA', $_client_id, $_client_secret) Func _SetCell_SheetGoogle($Row, $Column, $Value, $SheetID = '', $Client_ID = '', $Client_Secret = '') If Not $Client_ID Or Not $Client_Secret Then Return SetError(1, 1, MsgBox(4096, '', 'Not Found ID')) Local $URL = 'https://docs.google.com/spreadsheets/d/' & $SheetID & '/save?id=' & $SheetID & '&sid=' & $Client_Secret & '&c=1&w=1' Local $boundary = _WinHttpBoundaryGenerator() Local $xd = @CRLF & @CRLF Local $data2send = $boundary & @CRLF & _ 'Content-Disposition: form-data; name="rev"' & $xd & '' & @CRLF & _ $boundary & @CRLF & _ 'Content-Disposition: form-data; name="bundles"' & $xd & '[{"commands":[[21299578,{"1":{"1":"1859518452","2":' & $Row & ',"3":' & ($Row + 1) & ',"4":' & $Column & ',"5":' & ($Column + 1) & '},"2":{"1":6445244,"2":3,"3":{"1":3,"3":' & $Value & '},"6":0},"3":{"2":[{"2":513,"3":{"1":0},"12":0}]}}]],"sid":"' & $Client_Secret & '","reqId":0}]' & @CRLF & _ $boundary & @CRLF & _ 'Content-Disposition: form-data; name="selection"' & $xd & '[30710966,[null,[null,[null,"1859518452",' & $Row & ',' & $Column & '],[[null,"1859518452",' & $Row & ',' & ($Row + 1) & ',' & $Column & ',' & ($Column + 1) & ']],null,null,0]]]' & @CRLF & _ $boundary & '--' Local $cookie1 = _GetCookie(_HttpRequest(1, $URL)) Local $cookie2 = _GetCookie(_HttpRequest(1, $URL, '', $cookie1)) _HttpRequest(1, $URL, $data2send, $cookie1 & $cookie2, 'https://docs.google.com/spreadsheets/d/' & $SheetID & '/edit', 'client_id: ' & $Client_ID, 'PUT', True, $boundary) EndFunc Hope you help me. Thanks. _HttpRequest.au3 WinHttp.au3 WinHttpConstants.au3 ZLIB.au3 Link to comment Share on other sites More sharing options...
sukendn Posted April 25, 2016 Author Share Posted April 25, 2016 Plz hepl me !! Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted April 26, 2016 Moderators Share Posted April 26, 2016 @sukendn please explain how this is any different from the thread below, which you were specifically told you would receive no help on. "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
sukendn Posted April 27, 2016 Author Share Posted April 27, 2016 (edited) I guess that is a certain misunderstanding, hope you reconsider this issue help me. I just wanted to statistics users of my stuff. If you have any other way, you can help me ? Thank you Edited April 27, 2016 by sukendn Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted April 27, 2016 Moderators Share Posted April 27, 2016 @sukendn, as you failed to answer my question, this thread will also be closed. Don't post this question a third time. "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
Recommended Posts