|
-
Nov 7th, 2000, 09:32 AM
#1
Thread Starter
Frenzied Member
Hi,
I'm having the following problem trying to post data to a cgi sript on the web.. It keeps giving me a "501: Not Implemented" error when trying to post via Winsock.. However, if I use the exact same data and paste it into the web browser directly, it goes through.. Any ideas?
Thanks,
Dan
-
Nov 7th, 2000, 09:36 AM
#2
Fanatic Member
Can you post the code that posts via Winsock?
-
Nov 7th, 2000, 10:39 AM
#3
Thread Starter
Frenzied Member
Code:
Private Sub Submit(Data As String)
Dim sListing As String
'-- construct HTTP request
sListing = "POST /blablapath/script.cgi HTTP/1.0" & vbCrLf
sListing = sListing & "Accept: text/plain" & vbCrLf
sListing = sListing & "Content-type: application/x-www-form-urlencoded" & vbCrLf
sListing = sListing & "Content-length:" & Str(Len(Data)) & vbCrLf
sListing = sListing & vbCrLf
sListing = sListing & Data & vbCrLf & vbCrLf
'-- send the request
If Winsock1.State = sckClosed Then
Connect
Winsock1.SendData sListing
Else
Winsock1.SendData sListing
End If
End Sub
What's really weird though it that on the same web site, using a different cgi script to post different data, it works.. Is it possible that the site can sense that it's coming via winsock as oppossed to a web browser and therefore are blocking my post?
Any help would be appreciated..
Dan
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
|