Send gcode from remote server

Hi folks, 

Im working on a farm project. I have my own server where i can see the printers, status, etc.. and i can send jobs with a simple php submit form.
The problem is in the queued job system, and i dont know how to send the job from my server. To try to explain it, this are the steps:
1- User send a php form with attached gcode.
2- My server store the file, parse it and decide what printer use.
3- If this printer is ready to go, send the job to print.
4- If not, the job is queued, waiting that the user free the printer.

5- when the printer is ready, the server has to resend the print job commad using the stored file.

I try to use cURL to submit form-data with this stored file, but seems that only works with local files, not remote files.

Its simple: I need to replicate the direct print from url command that is available in repetier server.

Any ideas¿?

Thanks a lot.
Regards.

Comments

  • > I try to use cURL to submit form-data with this stored file, but seems that only works with local files, not remote files.
    what do you mean with only local files? Of course the file you want to attach to curl must be locally present. The curl target server can be at any reachable ip as long as API-Key matches.
  • Yep, that is the problem, cURL needs the file to be stored locally. I solved this by creating a batch file on my server (where I save the files) and calling it from PHP with the connection variables and the path of the gcode file.
Sign In or Register to comment.