Connect to URL with POST DATA

Moderator: leecollings

Post Reply
Tanuki44
Posts: 1
Joined: Saturday 17 June 2017 12:13
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Connect to URL with POST DATA

Post by Tanuki44 »

Hello,

This is my problem:
I would like to be able to order the activation of my already existing alarm.

This is activated after sending the command line http://phone-alert.alcatel-home.com/psses/arm/1234

But beforehand it must be connected to the site http://phone-alert.alcatel-home.com/users/login and validated via a form POST of which here is the HTML code:

Code: Select all

<form action="/users/login" class="form-horizontal" id="UserLoginForm" method="post" accept-charset="utf-8"><div style="display:none;">
	<input type="hidden" name="_method" value="POST"/></div>
	<fieldset>																				
		<div class="control-group required">
		<label for="UserEmail" class="control-label">Email</label><div class="controls">
			<input name="data[User][email]" maxlength="100" type="email" id="UserEmail" required="required"/></div></div><div class="control-group required">
		<label for="UserPassword" class="control-label">Mot de passe</label><div class="controls">
			<input name="data[User][password]" type="password" id="UserPassword" required="required"/></div></div><div class="control-group">
		<label for="UserRememberMe" class="control-label">Se souvenir de moi</label><div class="controls">
			<input type="hidden" name="data[User][remember_me]" id="UserRememberMe_" value="0"/>
			<input type="checkbox" name="data[User][remember_me]"  value="1" id="UserRememberMe"/></div></div>	
		<div class='form-actions'><button class="btn btn-primary" div="form-actions" type="submit">Connexion</button></div>
	</fieldset>
</form>	
I don't know how to write a script knowing that it is necessary to transmit three infos in automatickly :

data[User][email] = login
data[User][password] = password
data[User][remember_me] = 0

Thanks for your help !!!
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest