|
-
May 24th, 2002, 02:14 PM
#1
Thread Starter
Hyperactive Member
Winsock and webserver
Hi, I have connected a web server, and am trying to retrieve a page using winsock. However the server doesn't appear to send anything back.
Am I sending the correct thing?
Code:
MDIForm1.winOut.SendData "POST /p2p/list.php HTTP/1.0"
-
May 24th, 2002, 04:41 PM
#2
Member
Re: Winsock and webserver
MDIForm1.winOut.SendData "POST /p2p/list.php HTTP/1.0"
What are you actually trying to post?
-
May 24th, 2002, 07:43 PM
#3
PowerPoster
If you want to RETRIEVE a file, you have to use GET, not POST.
Code:
MDIForm1.winOut.SendData "GET /p2p/list.php HTTP/1.0"
-
May 25th, 2002, 08:55 AM
#4
Thread Starter
Hyperactive Member
Yep, thanks, i noticed that shortly after posting, but it doesn't seem to of had any effect 
Thanks anyway
-
May 25th, 2002, 09:00 AM
#5
Member
After sending the file request, you need to post a couple of headers about your web browser. I'm not sure what they are, though. Search the internet for 'Http headers'
-
May 25th, 2002, 09:29 AM
#6
Hyperactive Member
You don't need to submit the headers, but you do need to make sure you place two carriage return characters after your request. This lets the webserver know that its reached the end of the request and that it should send back the data.
Code:
MDIForm1.winOut.SendData "GET /p2p/list.php HTTP/1.0" & vbCrLf & vbCrLf
Check out http://www.winsockvb.com for more on Winsock and HTTP.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|