Dangerous Prototypes

Other projects => Past projects => Web platform => Topic started by: bretth on August 09, 2011, 09:18:13 pm

Title: HTTP GET/POST Client
Post by: bretth on August 09, 2011, 09:18:13 pm
Hi

I would like to trigger a HTTP Get or Post to a remote web server, the web platform being the client, when i have some certain conditions met, but, how do i go about the web client part of this, i looked through the TCPIP stack, but its wasn't clear to me!

An example URL i want to post is

Code: [Select]
http://sms1.cardboardfish.com:9001/HTTPSMS?S=H&UN=user01&P=pass1&DA=447973123456&SA=CBF&M=Please%20call%20me%20at%20the%20office

I use this to create SMS messages via the Cardboard fish service

Thanks
Brett
Title: Re: HTTP GET/POST Client
Post by: ian on August 22, 2011, 11:01:26 am
Hi Brett,

You can use the TCP example state machine to setup a socket and call the web address. Here are some examples I use for parsing Twitter feeds. You don't need the parsing part, only the first few states that configure the network and send the request:
http://www.google.com/codesearch#-bEpXu ... t_treev1.c (http://www.google.com/codesearch#-bEpXuEXFpM/trunk/web-platform/firmware/tweet_tree/tweet_treev1.c)
http://dangerous-prototypes-open-hardwa ... t_treev1.c (http://dangerous-prototypes-open-hardware.googlecode.com/svn/trunk/Web_Platform/firmware/Thermal_Tweet/tweet_treev1.c)

I'm sorry about the late reply to this. If you're still working on it I can help.

( ! ) Fatal error: Uncaught exception 'Elk_Exception' with message 'Please try again. If you come back to this error screen, report the error to an administrator.' in /var/www/dangerousprototypes/forum/sources/database/Db-mysql.class.php on line 696
( ! ) Elk_Exception: Please try again. If you come back to this error screen, report the error to an administrator. in /var/www/dangerousprototypes/forum/sources/database/Db-mysql.class.php on line 696
Call Stack
#TimeMemoryFunctionLocation
10.00892054936session_write_close ( )...(null):0
20.00922186528ElkArte\sources\subs\SessionHandler\DatabaseHandler->write( )...(null):0
30.00922187304Database_MySQL->query( ).../DatabaseHandler.php:119
40.05172326040Database_MySQL->error( ).../Db-mysql.class.php:273