[英]how do i send data from a php file on a remote web host to a c# application on my computer?
[英]How do I send data to a php file from my installer?
我正在嘗試在NSIS安裝程序上驗證用戶密碼,因此我將發送至編碼php腳本以比較值。 它似乎根本不與php腳本交互。 我相信我的問題可能在PHP中。
<?php
include ("Encryption.php");
$data = $_POST;
$a = new encryption_class();
$encryption = //encryption code;
?>
<html><head>
<title> - </title></head>
<body>
<? echo $data ?> <br>
<? echo $encryption;?>
</body>
</html>
當我嘗試使用post方法將信息從安裝程序發送到php腳本時,我感覺好像丟失了一些東西。
抱歉...這是NSIS的電話
Section
SetOutPath $DOCUMENTS/
StrCpy $1 "userpass"
#text files for reading and writing with the post command
File "pass.txt"
File "encrypt.txt"
#write the user variable to the pass.txt file
ClearErrors
FileOpen $0 pass.txt w
IfErrors done
FileWrite $0 "$1"
FileClose $0
done:
FileOpen $3 encrypt.txt w
inetc::post $0 /FILE "http://mywebserver/installer_get_pass.php" $3 /END
SectionEnd
我尚未完成腳本,但是當我打開應該在其中寫輸出的txt文件時,它為空白
inetc::post $0
將一個(closed!)文件句柄傳遞給插件。 參數$3
有類似問題,請嘗試使用路徑:
...
done:
StrCpy $0 "$documens\pass.txt"
StrCpy $3 "$documens\encoded.txt"
inetc::post $0 /FILE "http://mywebserver/installer_get_pass.php" $3 /END
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.