Restored from previous forum. Originally posted by ricardo.
My question is:
How did a server detects which link do the user click (if no script is used, like in Google case)?
And then, how could my app go to some page (let say Google search results) and simulates to click a link.
I was wondering if this was done by http headers, because a page knows from where the user gets in there by the refferer into the HTTP header, but i dont know if this same is used when living a page to comunicate the server the new destiny and if this was choosed by a click... i suppouse not.
I want to go to a site (say Google) and open some page (some search results)and simulate the i click some link (of course doing by code and not by clicking by hand)...
Could be done using webgadget or any other way, i dont care this if i can do it.
Any idea?
simulating clicking a link on a web page?
-
BackupUser
- PureBasic Guru

- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
Restored from previous forum. Originally posted by traumatic.
I really don't understand what you're trying to achieve, but a server
doesn't detect anything. Clicking a link simply sends another request
to the server.
Whenever you write yor seachstring into the inputfield
on google.com, the form will send your request as 'GET' (appending
the parameters to the uri (?param1=foo&m2=foo&m3=...)), so the
url you've had to chose to skip the 'submit search'-part was:
http://www.google.com/search?q=searchstring
In case you want to jump to a search-result afterwards, just retrieve
the result, parse it (ie. search for links) and send your chosen link
again.
hmm.... did this help you?
what exactly are you trying to do?
I really don't understand what you're trying to achieve, but a server
doesn't detect anything. Clicking a link simply sends another request
to the server.
Whenever you write yor seachstring into the inputfield
on google.com, the form will send your request as 'GET' (appending
the parameters to the uri (?param1=foo&m2=foo&m3=...)), so the
url you've had to chose to skip the 'submit search'-part was:
http://www.google.com/search?q=searchstring
In case you want to jump to a search-result afterwards, just retrieve
the result, parse it (ie. search for links) and send your chosen link
again.
hmm.... did this help you?
what exactly are you trying to do?
-
BackupUser
- PureBasic Guru

- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
Restored from previous forum. Originally posted by ricardo.
Hi,
Maybe using some script ot something, but servers like Google (just as an example) detects which links was clicked by the user and in those cases is not the same if you just parse the web page and direct your browser to the link url, the call it click-through.
In fact i have done this on VB using the IE activex with this easy sub
This simple code search all the links of a web page and if the link that i am searching is founded then click through, in this case i was searching for pure basic web page on google and click on it when i found it, and believe me that Google detects the clicks that everylink receives, in fact they use this link-click info for ranking pourposes.
(a dirty trick!!)
Of course i dont know how to do it in PureBasic, and most of all i want to research if it can be done without the webgadget, just using network commands if it can't be done, then i want to know how to do the same im doing in VB with PB.
Thanks
Hi,
Maybe using some script ot something, but servers like Google (just as an example) detects which links was clicked by the user and in those cases is not the same if you just parse the web page and direct your browser to the link url, the call it click-through.
In fact i have done this on VB using the IE activex with this easy sub
Code: Select all
For i = 0 To Url.Document.links.length - 1
If InStr(LCase(Url.Document.links(i).href), "[url]http://www.purebasic.com[/url]") 0 Then
Url.Document.links(i).Click
Exit Sub
End If
Of course i dont know how to do it in PureBasic, and most of all i want to research if it can be done without the webgadget, just using network commands if it can't be done, then i want to know how to do the same im doing in VB with PB.
Thanks