Issuing an http request via c
OS: RedHat Linux
I have to write a c program that should issue an HTTP GET request such as the following:
http://foobar.com/Processbounce.php?remove=1 (The script updates a row
in the database table)
I tried using socket for that on port 80.
I used functions:
1) sockfd = socket(PF_INET, SOCK_STREAM, 0)
2) connect(sockfd, (struct sockaddr *)&dest_addr, sizeof(struct
3) bytes_sent = send(sockfd, msg, len, 0) ; // msg contains the http
headers get request
The problem is that the script doesn't work. I tried many variations
of http header get request with no success.
Re: Issuing an http request via c
Can you share the exact code that is not working.
|All times are GMT +5.5. The time now is 07:32.|