cURL and Twitter

2 posts in this topic

DeltaRocked 2

I have created / registered a twitter app and have generated customer keys and access token, but unable to understand how to use it. I have assumed that using the access token it would be possible to login into twitter without using the necessary web-browser based auth - This is presently being provided by sean's twitter udf.

The reason is that I am working on a cli based application and is being used for automation purposes.

I also wanted to know

1: Whether it would be possible to use curl udf to connect to twitter (oAuth) without using a username/password.

Similar Content

May be some of you know Songr .
This script do the same job, it can find more mp3 files but is not as fast as Songr.

Sites used are music search engine Websites designed for LEGAL entertainment purposes only.
Thanks to Brett Francis, Prog@ndy and Eukalyptus for >Bass Udf, trancex for >WinHttp Udf and the AutoIt Community for his help.

Changes of v1.0.8.5

Three websites replaced cause they are dead or use now js.
All search engines updated ( not without difficulties for audiodump)
I use RAGrid.dll for the first listview (more fast and stable, but with some inconvenients to manage the no-edit of cells)
Input queries are saved ( the twenty latest)
I use now an mp3 pre-Load management before playing and a double progressbar for visualize pre-load and play, where you can click for directly go play in the loaded part.
Most includes needed are embedded and all external files are embedded in script with >BinaryToAu3Kompressor .
Multi downloads available with embedded downloader.exe

Changes of v1.0.8.8
Search on audiodump and myfreemp3 fixed.
New buttons.
Added Gui Menu.
Titles are no more editable.
New "About" with >TaskDialog (Thanks Prog@andy)
Query button permit now to check / uncheck all checkboxes
And some few fixes and cleaning.
Really more stable now.
Changes of v1.0.9.2
Dilandau is replaced by mp3chief and mp3ili by mp3clan
Search on mp3juices, baseofmp3 and soundcloud fixed.
Soso now provide m4a (aac) instead of mp3 ( m4a can be played by MSE)
Added possibility to encode automaticaly to mp3, aac or ogg ( at the end of download) using bassenc.dll and command line tools : lame, faac and oggenc.

Changes of v1.0.9.3
mp3skull fixed
mp3chief fixed
myfreemp3 fixed
mp3clan changed to tusmp3
mp3juices changed to emp3world
baseofmp3 changed to imp3
and some minor improvements.
Version 2.0.0.6
Most previous websites used are dead or have changed the way to get links,
so instead of try to repair the previous version, i have created a complete new version.
The main tendency is the simplification :
Only one website : audiodump (Up to 500 results by request)
Script use now the little pearl created by Ward : curl.au3
It permit to create tasks (get source and get multi mp3) in asynchronous mode.
So now, no need to use several executables and no more gui who do not respond in case of connection problems.
Script use Bass.dll X86 loaded in memory for play songs.
Result is light and fast, but don't abuse of audiodump servers who are not beasts of race.
Warning : For avoid errors with curl.au3, you'll need to comment the line 63 : ;~ #Include <BinaryCall.au3>
@AutoItX64 not supported and only tested on Win7X64 and Win8.1X64.
As your browser, use Ctrl+w for remove the current Tab.(if there is no search or download running from it)
And also Ctrl+q for set/remove Gridlines.
Events are displayed to the bottom of the Gui.

Version 2.0.1.1
Added a Paste Button.
Querry list is now correctly saved.
Querry Combo is now sorted in alphabetical order
After a 'No match', the next search will use the previous empty listview.
Bug when removing tabs is corrected.
Added string correction for the request that, in the previous version, was not always able to return a correct result.

A big thanks to Ward for his great UDF, and Nina my favorite tester, (who between us is also my third daughter), for his precious advices .
previous downloads : 1703

As there is no more script downloads count, source and executable are available in the downloads section

What's the best way to receive file from a desktop app?
app.exe will execute a cmd with "au3file.exe /path/of/the/file.xml" and the au3file.exe will get and delete that.
Or else?
THE MOST IMPORTANT PART OF THE QUESTION
And best way to transfer file to a desktop app?
au3file.exe do a $_POST request and the app.exe MUST HAVE a local HTTP server that can receive $_POST, but it looks heavy 'cause the app must have a server such XAMPP.
au3file.exe execute a cmd with "app.exe /path/of/the/file.xml" and the app.exe will now get that file and delete.
Or else?

Hi all:
I have a small problem with Curl syntax to send a POST to a CouchDB database.
I want send this:
-H Content-type: application/json -X POST http://127.0.0.1:5984/test -d {"title": "pencil"}
but this code does not work:
$code ='curl.exe -H Content-type: application/json -X POST http://127.0.0.1:5984/test -d {"title": "pencil"}'
Run(@ComSpec & " /k " & $code,"",@SW_HIDE)
but to work I have to format the line like this:
$code = 'curl -H "Content-Type: application/json" -X POST "http://127.0.0.1:5984/test" -d "{\"title\":\"pencil\"}"'
Run(@ComSpec & " /k " & $code,"",@SW_HIDE)
my question is whether this is the most correct way to write the correct code using the additional signs " and \ or is there some other more elegant way to do the same.
Thank's

Changelog :
==========> AutoIt Radio Player v0.0.0.8.zip <==========
Personal Message :
This is my first script posted. Any comment are welcome. Give me your best web radio i will try add them !
Install/Use :
Add a station :
Unsolved problem :
When the coverGUI go outside the monitor and comeback inside, a part of current cover disapear : I have no idea how fix that

I will add the splunk remote export and then combine them if there is interest (think i might be the only security guy here).
this will return the XML reports from paloalto for the hashes in the list. hashlist should be relative to the script, as well the reports will be written to the scriptdir.
;curl test
#include<file.au3>
local $aHashes
$curldir = "C:\Users\curluser\Desktop\CURL\" ; with trailing backslash
$sApiKey = "This is where the API Key Goes"
_FileReadToArray("hashlist.csv" , $aHashes , 0) ; This is a list of SHA-256, one per line. As mine was exported from Splunk the first row is the table name....
For $i = 1 to ubound($aHashes) - 1 ; ...so its skipped here by starting on 1 instead of 0
$iPid = run($curldir & "curl -k -F hash=" & $aHashes[$i] & " -F format=xml -F apikey=" & $sApiKey & " https://wildfire.paloaltonetworks.com/publicapi/get/report", "", @SW_HIDE , $stdout_child)
$sOutput = ""
While 1
$sOutput &= StdoutRead($iPID)
If @error Then
ExitLoop
EndIf
WEnd
filewrite($aHashes[$i] & ".xml" , $sOutput)
next