Posting to url

Bringing the internet highway into your project? Building FTP, HTTP, email, chat or other client solutions?

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
TKYTKY
Posts: 46
Joined: Thu Jul 11, 2013 9:25 am

Posting to url

Post by TKYTKY » Mon Sep 02, 2013 3:19 am

Hi all ,

i wanted to post stuffs to a server so i found a sample postserver on the internet and try to post it to the server .

Code: Select all

   put urlEncode(field "comment") into tcomment   

   put "comment=", tcomment into n
   replace"," with "" in Pcomment


  post Pcomment to url "http://posttestserver.com/post.php"

  if the result is not empty then
     answer it
  else
     answer "Unsuccessful"
  end if
  
 
. is there something wrong with my codes ?

bangkok
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 937
Joined: Fri Aug 15, 2008 7:15 am

Re: Posting to url

Post by bangkok » Mon Sep 02, 2013 8:58 am

Voila :

Code: Select all

 put urlEncode(fld "comment") into tcomment   
   
   put "comment="& tcomment into Pcomment
   
   post Pcomment to url "http://posttestserver.com/post.php"
   
   answer it

Post Reply

Return to “Internet”