If you have a problem or need to report a bug please email : support@dsprobotics.com
There are 3 sections to this support area:
DOWNLOADS: access to product manuals, support files and drivers
HELP & INFORMATION: tutorials and example files for learning or finding pre-made modules for your projects
USER FORUMS: meet with other users and exchange ideas, you can also get help and assistance here
NEW REGISTRATIONS - please contact us if you wish to register on the forum
Users are reminded of the forum rules they sign up to which prohibits any activity that violates any laws including posting material covered by copyright
HTTP POST questions
3 posts
• Page 1 of 1
HTTP POST questions
Hey guys, im trying to mess around with this module (I know its on the forums here somewhere).
I have 3 questions maybe someone here has knowledge of:
1. What is the "ID" field for?
2. How can I send a message back from my server ? (see in the php 'echo $mail_sent ?' )
3. How can I create more key-value pairs to send data back and forth from my server ?
My PHP is non existent atm
Have a look at my example:
I have 3 questions maybe someone here has knowledge of:
1. What is the "ID" field for?
2. How can I send a message back from my server ? (see in the php 'echo $mail_sent ?' )
3. How can I create more key-value pairs to send data back and forth from my server ?
My PHP is non existent atm
Have a look at my example:
- Drnkhobo
- Posts: 312
- Joined: Sun Aug 19, 2012 7:13 pm
- Location: ZA
Re: HTTP POST questions
There is an output node in this primitive "any returned data from the server".
My gues is, what goes back - depends on what you have on the server?
Anyway - what comes back from your server?
But there are IP based primitives (network client and network server), so probably you can use them with it. For example you send a request for IP, you get the IP, and then...
p.s.: my php is like my ruby...
My gues is, what goes back - depends on what you have on the server?
Anyway - what comes back from your server?
But there are IP based primitives (network client and network server), so probably you can use them with it. For example you send a request for IP, you get the IP, and then...
p.s.: my php is like my ruby...
Need to take a break? I have something right for you.
Feel free to donate. Thank you for your contribution.
Feel free to donate. Thank you for your contribution.
- tester
- Posts: 1786
- Joined: Wed Jan 18, 2012 10:52 pm
- Location: Poland, internet
Re: HTTP POST questions
my php is like my ruby...
Yeah I saw that and inside the fsm is my php script im using.
Ill post it here:
- Code: Select all
<?php
//Capture data from $_POST array
$to = $_POST['to'];
//define the subject of the email
$subject = $_POST['subject'];
//define the message to be sent. Each line should be separated with \n
$message = $_POST['Message'];
$ID = $_POST['ID'];
//define the headers we want passed. Note that they are separated with \r\n
$headers = "From: noreply@myemail.com\r\nReply-To: noreply@myemail.com";
//send the email
$mail_sent = @mail( $to, $subject, $message, $headers );
//if the message is sent successfully print "Mail sent". Otherwise print "Mail failed"
echo $mail_sent ? "Mail sent" : "Mail failed";
?>
see there . .
- Code: Select all
echo $mail_sent ? "Mail sent" : "Mail failed";
How do I get this to come back to the module?
- Drnkhobo
- Posts: 312
- Joined: Sun Aug 19, 2012 7:13 pm
- Location: ZA
3 posts
• Page 1 of 1
Who is online
Users browsing this forum: Google [Bot] and 95 guests