Quantcast
Channel: VBForums - Visual Basic 6 and Earlier
Viewing all articles
Browse latest Browse all 21839

Winsock Multiple GET Requesting

$
0
0
Hey,

Fairly simple issue here...

I'm building a Google Rank Checker. Basically it goes to google.com page 1, searches source for a string of text (in my case, my website URL)

Simply put, this is what the program is doing (not actual code, just rough example so you get the idea)

Code:

winsock.connect
winsock.getdata

check for string
if found exit sub
else
go to page 2

My issue is, right now I'm having winsock close its connection and re-open it to check page 2. And this takes the program a long time when it should be fast. Its also opening/closing a lot of unneeded connections making it sloppy.

My solution? Is it possible to simply use winsock.senddata for a second GET command from the same connection?

So basically:

winsock.connect
winsocket.senddata GET
search source, if found exit sub
else
winsock.senddata GET

would that work? I tried something similar and I was getting errors. Before I spent more time figuring it out, I figured i would check to make sure its even possible.

If its not possible, the only other way to speed things up would be to do multiple/an array of sockets, correct?

Thanks in advance!

Viewing all articles
Browse latest Browse all 21839

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>