[RESOLVED] Help to send data using winsock
i have to send a long chunk of data by winsock but the probelm is how can i do that in 2 line. example..
VB Code:
Winsock1SendData "GET [url]http://www.domian.com/themessagelinkhere/editpage.sendorsubmit[/url] HTTP/1.1" & vbCrLf
so i want to send the data in 2 seperate lines like below
VB Code:
Winsock1SendData ("GET [url]http://www.domian.com/themessagelinkhere/)[/url], _
(editpage.sendorsubmit HTTP/1.1") & vbCrLf & vbCrLf
but i forgot how to use _ in vb or winsock so i can send the correct data to the server..
Re: Help to send data using winsock
To split a string across multiple lines you need to 'close' it at the end of one line, and 're-open' it on the next, eg:
VB Code:
Winsock1SendData "GET [url]http://www.domian.com/themessagelin...ge[/url].[b]"[/b] _
[b]& "[/b]sendorsubmit HTTP/1.1" & vbCrLf
Re: Help to send data using winsock
Also, you don't need to specifiy the domain name in the GET request...
So you can just send everything after ".com"
Re: Help to send data using winsock
thanks peoples, i really have no word to thanks you all. i really learn alot from this site and so if i can do anything to help this forum then i will. :wave:
Re: Help to send data using winsock
and you both guys are big help me to me and i did learn so many things from you... thanks alot... :wave:
Re: Help to send data using winsock
You can also put the string into a string variable and use that as the parameter, instead of using the literal string. In case of problems, that gives you something to Debug.Print or MsgBox, so you can see if the string you thought you're sending is really the one you're sending.