Jump to content


2 replies to this topic

#1 cdel

  • Banned
  • 496 posts
  • LocationMelbourne, Australia

Posted 10 March 2015 - 08:04 AM

I am creating a HTTP program that contacts my webserver and saves the posted data to a file. The two post names I am using are "author" and "message" these are the same for both the program and the server. For examples sake, I am just creating a mock up PHP script due to the nature of the script and I have eliminated any other factors that could lead to problems.

  $current = $_POST["author"] . ": " . $_POST["message"];
  echo $current;

local handle = http.post("http://cdel.ddns.net/chirp/post.php", "author=test&message=tset")

Program.lua should print "test: tset", however it just returns nil. I am using noip.com as I have a dynamic ip address, thought I should mention it, just in case it is effecting the functionality.

#2 oli414

  • Members
  • 29 posts
  • LocationThe Netherlands

Posted 10 March 2015 - 08:26 AM

I've tested it on my own webserver but it seems to work fine, I'm afraid it is because of your dynamic ip address. You should also check your Computercraft configuration file, HTTP needs to be enabled.

Edited by oli414, 10 March 2015 - 08:29 AM.

#3 cdel

  • Banned
  • 496 posts
  • LocationMelbourne, Australia

Posted 10 March 2015 - 08:43 AM

HTTP is enabled, it must be the dynamic IP. I'll look into setting up some macros to change my domain records once the router IP change has been detected.

Now that I think about it, it might be due to my internet being slowed (went over my data cap).

1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users