I'm new with CGI, I"m testing a client-server connexion and I have to make my server able to receive a request (some data). The request is sent using a program writing with cURL and I need a CGI script on my server wich allow me to read the request and put the content on a file. I've searched on the web, all I've found is about form, but the one I need have to work without form. The request isn't sent from a web page.
Anyone has an idea?? Or can recommend me a document or some script??
It depends how the client is sending the request (I am not familiar with cURL). If it is using a standard HTTP request on the port that your website is running then it will look exactly the same as a request from a browser and all the code you have seen for handling browser submitted data will work.
If the client is sending on a different port or sending in a different format than HTTP then you may need to write your own low-level handler, either at the level of listening to a port (doing the job that the web server does on port 80 - HTTP) or just in terms of handling the data that is passed to you by the web server.
I was already able to get a web page from a server using cURL, and I could see this page stored on my folder. So I guess that cURL generate standard HTTP request, but still dont understand why my code does produce error segmentation after connecting to the server. Anyone has any idea ??