dcsimg
www.webdeveloper.com
Results 1 to 4 of 4

Thread: sending request with CGI

  1. #1
    Join Date
    Apr 2003
    Posts
    2

    sending request with CGI

    Hi all

    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??

    Any comments will be greatly helpful.

    Thanks a lot.

  2. #2
    Join Date
    Feb 2003
    Location
    Derby, UK
    Posts
    456
    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.

  3. #3
    Join Date
    Apr 2003
    Posts
    2
    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 ??

    Thanks a lot.

  4. #4
    Join Date
    Feb 2003
    Location
    Derby, UK
    Posts
    456
    Would need more details about the exact nature of the request from curl and the error that it gets. Have you tried calling your script with a browser - you may get a more useful error that way?

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles