sending url referal from in game

Community Forums/General Help/sending url referal from in game

RifRaf(Posted 2010) [#1]
Is there any way to send a url http referal if you are direct linking from in a 3D game.. currently I am using shellexecute () on a url string to open a web page, but I need to somehow let the page know im comming from my game, or at least a predetermined website address.

Is this possible?


_PJ_(Posted 2010) [#2]
I'm not sure how http referral works, but I assume soem kind of message prefixed with a specific code value is sent to tell the web page where the referall is from?

If you look at the code in the archives here:
http://www.blitzbasic.com/codearcs/codearcs.php?code=2279
(Which I use mainly for downloading from the web)

The first thing that happen after connecting, is a sending of this data:

WriteLine tcp, "GET " + link_path$ + link_file$ + " HTTP/1.1" + Chr(13) + Chr(10) + "Host: " + host$ + Chr(13) + Chr(10) + "User-Agent: Download_Function_By_DevilsChild" + Chr(13) + Chr(10)


Kinda like a handshake-thing. I know the actual text following "User-Agent:" in the line can be chaanged with no adverse effects for simple web-browssing, but I'm sure there must be a reason for sending a packet :)

Maybe that could be helpful? If it's not related, then sorry for wasting your time. It was the only thing that sprang to mind when I read your question!


xlsior(Posted 2010) [#3]
Depending on how much control you have over the website, you can also send variables straight as part of the URL, e.g.:

http://mysite.com/index.php?Game=Awesome&version=2.0&redirect=purchase

the website can then see those values and act accordingly if you are using any server-side scripting language like PHP or ASP, instead of just plain vanilla HTML.


RifRaf(Posted 2010) [#4]
I may have to go that route and go through a script on my website, then jump to the desired url.

thanks