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 not working?
6 posts
• Page 1 of 1
HTTP POST not working?
Dear support.
I have a great issue with HTTP POST primitive, because it does not send nothing.
I connected:
[string]http://www.website.com[string]
[string]/folder/folder2/script.php[string]
[array] var names [array]
[array] var data [array]
[trigger] trig. button [trigger].
All is setup as in the component reference. but it do nothing.
I tried to disable firewall. Nothing.
How i can solve this?
And another thing, how do i return data from php to the data received(string)?
I have a great issue with HTTP POST primitive, because it does not send nothing.
I connected:
[string]http://www.website.com[string]
[string]/folder/folder2/script.php[string]
[array] var names [array]
[array] var data [array]
[trigger] trig. button [trigger].
All is setup as in the component reference. but it do nothing.
I tried to disable firewall. Nothing.
How i can solve this?
And another thing, how do i return data from php to the data received(string)?
Need my support for app development, website or custom scripts?
PM me if you are interested.
Experienced Java, J2EE, PHP, Javascript, Angular, Cloud Solutions developer.
PM me if you are interested.
Experienced Java, J2EE, PHP, Javascript, Angular, Cloud Solutions developer.
-
CoreStylerz - Posts: 327
- Joined: Sun Jan 22, 2012 2:19 am
- Location: italy
Re: HTTP POST not working?
Just tested it here and it all works ok?
Do you have an active php script for the HTTP to talk to? (you have to write this yourself on your server)
Here's an example: SendEmail.php
<?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";
?>
Here is FlowStone example to talk to this server script:
There is more information on HTTP Post here: http://en.wikipedia.org/wiki/POST_%28HTTP%29
Do you have an active php script for the HTTP to talk to? (you have to write this yourself on your server)
Here's an example: SendEmail.php
<?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";
?>
Here is FlowStone example to talk to this server script:
There is more information on HTTP Post here: http://en.wikipedia.org/wiki/POST_%28HTTP%29
-
support - Posts: 151
- Joined: Fri Sep 07, 2012 2:10 pm
Re: HTTP POST not working?
Hey Support, Ive tried your example and just added a bit more text to the message field.
It sends the mail but with only 7 characters. . . ?
I used your example EXACTLY so im confused why its sending only with 7 chars?
I also get a popup displaying my port number, is that correct?
Im using FS2 tho. . .
It sends the mail but with only 7 characters. . . ?
I used your example EXACTLY so im confused why its sending only with 7 chars?
I also get a popup displaying my port number, is that correct?
Im using FS2 tho. . .
- Drnkhobo
- Posts: 312
- Joined: Sun Aug 19, 2012 7:13 pm
- Location: ZA
Re: HTTP POST not working?
Hi thanks for fast reply.
Yes I already done a script in PHP that collect data from post and store in db, then should give a response.
The script use correctly $var = $_POST['var']..
What does not work is sending from fs. I can't understand what does block since the primitive produce no log or debug of what it does.
May the strings are too big?
I will send you details via pm with fan and links to script including source so you can have a look.
At first I though that the problem was made by local server, web matrix (iss + apache2), because it use ports.
Yes I already done a script in PHP that collect data from post and store in db, then should give a response.
The script use correctly $var = $_POST['var']..
What does not work is sending from fs. I can't understand what does block since the primitive produce no log or debug of what it does.
May the strings are too big?
I will send you details via pm with fan and links to script including source so you can have a look.
At first I though that the problem was made by local server, web matrix (iss + apache2), because it use ports.
Need my support for app development, website or custom scripts?
PM me if you are interested.
Experienced Java, J2EE, PHP, Javascript, Angular, Cloud Solutions developer.
PM me if you are interested.
Experienced Java, J2EE, PHP, Javascript, Angular, Cloud Solutions developer.
-
CoreStylerz - Posts: 327
- Joined: Sun Jan 22, 2012 2:19 am
- Location: italy
Re: HTTP POST not working?
Ok.. i entered http:// in the url and wasn't working
Need my support for app development, website or custom scripts?
PM me if you are interested.
Experienced Java, J2EE, PHP, Javascript, Angular, Cloud Solutions developer.
PM me if you are interested.
Experienced Java, J2EE, PHP, Javascript, Angular, Cloud Solutions developer.
-
CoreStylerz - Posts: 327
- Joined: Sun Jan 22, 2012 2:19 am
- Location: italy
Re: HTTP POST not working?
I used your example EXACTLY so im confused why its sending only with 7 chars?
I also get a popup displaying my port number, is that correct?
Im using FS2 tho. . .
There was a bug in V2 that caused the pop up (now fixed in V3). You can test it in FS V3 FREE or upgrade.
There is no limit on characters we used this a lot and sent large data sets around using HTTP Post?
-
admin - Site Admin
- Posts: 231
- Joined: Tue May 11, 2010 6:30 pm
6 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 76 guests