String aus txt (aufm ftp) lesen und übergeben
-
Hi
Ich brauche mal hilfe zu folgendem:
Will z.b. von einer txt file die erste zeile grabben und löschen.
Sprich aufm ftp ist eine "Test.txt " mit folgendem Inhalt:
Hallo Moin Ciao
So brauche einen c#/c++ codeschnipsel der sich dann string "Hallo" nimmt, ihn lokal übergibt und aus der txt löscht.
danach bleibt dann
Moin Ciao
usw.
Hoffe ihr habt was!
BTW.
Habe natürlich google Entjungert, und sowas gefunden:#include <iostream> #include <windows.h> #include <wininet.h> #pragma comment (lib, "libwininet.a") int main() { HINTERNET hOpen, hURL; hOpen = InternetOpen("Test", INTERNET_OPEN_TYPE_DIRECT, NULL, NULL, 0 ); hURL = InternetOpenUrl( hOpen, "ftp://www.meinftp.com/test.txt", NULL, 0, 0, 0 ); char file[101]; unsigned long read; InternetReadFile(hURL, file, 100, &read); }
Aber da kommt ne Fehlermeldung
btw adresse ist zensiert ^^EDIT:
Download Text File into String Variable
http://www.example-code.com/asp/ftp_downloadIntoString.aspWäre die Darstellung der txt in html Form und die daraus resultierende übergabe der file als strin var. zum vorteil?
Edit2:
[COLOR="orange"]Im moment bekomme ich die email durch ne user eingabe[/COLOR]
Wäre aber nice wenn es dann automatisch über die txt file ginge! (muss keine txt sein)
---
Das Lokale script, email wird hier der var. uEmail zugeordnet!sCheckScriptPath = "/inc/input.php"; sFullScriptPath = sCheckScriptURL .. sCheckScriptPath; nicResult = Drive.GetInformation("C:"); varHDD = nicResult.SerialNumber; uEmail = "";
mfg
-