Search the Community
Showing results for tags 'Passing'.
-
I need to make one client send parameters, and others read them. I do not understand how to do this. Here is an example: in browser i sent "demo:1234@192.168.xxx.1:8077/?luxs=46&onoff=0" procedure TMainForm.UniTimer1Timer(Sender: TObject); begin if UniApplication.Parameters.Values['luxs']<>'' then lux1:=strtoint(UniApplication.Parameters.Values['luxs']); UniProgressBar1.Position:= lux1; end; It's work fine for client who sent it. But not for all client sessions. Trying to do an analysis leads to exception: procedure TUniServerModule.UniGUIServerModuleHTTPCommand( ARequestInfo: TIdHTTPRequestInfo; AResponseInfo: TIdHTTPResponseInfo; var Handled: Boolean); begin if ARequestInfo.AuthExists and (ARequestInfo.AuthPassword='1234') and (ARequestInfo.AuthUsername='demo') then begin if ARequestInfo.Params.Values['luxs']<>'' then MainForm.lux1:=strtoint(ARequestInfo.Params.Values['luxs']); Exit; // Authentication is successful end else begin AResponseInfo.AuthRealm := 'Enter credentials for ' + Title; handled:=True; end; end; If you have simple code examples, please write them in this thread/ Thank u!
- 5 replies
-
- Passing
- Parameters
-
(and 3 more)
Tagged with:
-
Hi Forum! This is the case: A HTML page with ASP define variables, Session variables. code: <html> <% Dim urlname urlName = "localhost:/cgi-bin/mydll.dll" Session("virtualSnipper") = MySnipperFunction(Session.id) %> <head> <title>My Title</title> </head> <body> <iframe name="framei" id="framei" frameborder="0" width="100%" height="98%" src="<%=urlName %>"> </iframe> </body> </html> When mydll.dll (an unigui web application) is called, the session has defined "virtualSnipper" value. Hoy can read that value into my unigui application and where (datamodule, mainform, dpr) ? is it possible?.. Thanks