I want to automate the imagehoster pics.lt, unfortunately the used PHP-Script has no API.
http://pics.lt/index.php?lang=english
Thank you in advance.
^#include <WinHttp.au3>
#include <String.au3>
$hOpen = _WinHttpOpen()
$hConnect = _WinHttpConnect($hOpen, "pics.lt")
$aHeader = _WinHttpSimpleRequest($hConnect, "GET", "/index.php?lang=english", $WINHTTP_NO_REFERER, $WINHTTP_NO_REQUEST_DATA, $WINHTTP_NO_ADDITIONAL_HEADERS, True)
$aCookie = _StringBetween($aHeader[0], "Cookie: ", ";")
$hImage = FileOpenDialog("", @ScriptDir, "(*.bmp; *.gif; *.png; *.jpg)")
$bImage = FileOpen($hImage, 16)
;$sHeader = ?!
_WinHttpSimpleRequest($hConnect, "POST", "/upload.php", "pics.lt/index.php?lang=english", $bImage, $sHeader)