Tiger Posted March 1, 2009 Share Posted March 1, 2009 How can I set the Referrer of an autoit script. If I load a file from my server, then stands in the log file AutoIt as referrer. How can I change that? My UDFs:- _RegEnumKey Link to comment Share on other sites More sharing options...
GrungeRocker Posted March 1, 2009 Share Posted March 1, 2009 Please be more accurate... I don't get what you mean. Are you downloading the file with a AutoIt script? [font="Verdana"]In work:[list=1][*]InstallIt[*]New version of SpaceWar[/list] [/font] Link to comment Share on other sites More sharing options...
Tiger Posted March 1, 2009 Author Share Posted March 1, 2009 I download a file with an autoit script. and then I look into my server logfile, I see AutoIt as referrer My UDFs:- _RegEnumKey Link to comment Share on other sites More sharing options...
exodius Posted March 1, 2009 Share Posted March 1, 2009 (edited) I download a file with an autoit script. and then I look into my server logfile, I see AutoIt as referrerLOL, that is one vague little screenshot, since you're having trouble offering the information, I'll ask you for it:What kind of file? (Looking for a filetype here)What kind of server? FTP? WWW? (Protocol)What kind of server as in Apache or something else? (would help if anyone's already familiar with what you're using)What are you expecting to see that you're not seeing? (what should it be showing)How are you downloading the file with the AutoIt script? (are you using INetGet or something else)You said you're using an autoit script to download a file, we'd love to see it posted which would answer a lot of these questions for you.*Edit - Come on now, you've got 217 posts and you don't include all of this stuff when asking for help? Edited March 1, 2009 by exodius Link to comment Share on other sites More sharing options...
Tiger Posted March 1, 2009 Author Share Posted March 1, 2009 LOL. I use INetGet. And that is a http-download. I would like to change the referrer. In the moment is AutoIt the referrer. My UDFs:- _RegEnumKey Link to comment Share on other sites More sharing options...
Developers Jos Posted March 1, 2009 Developers Share Posted March 1, 2009 Referer is the site the person was browsing and contained the reference to your server/site. SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
exodius Posted March 1, 2009 Share Posted March 1, 2009 Referer is the site the person was browsing and contained the reference to your server/site.The man speaks the truth. So I take it from your response Jos that INetGet shouldn't cause the Referrer to show as coming from AutoIt? Link to comment Share on other sites More sharing options...
Tiger Posted March 1, 2009 Author Share Posted March 1, 2009 (edited) And how can I change the referrer? I would like to use File-Loader as Referrer. Edited March 1, 2009 by Tiger My UDFs:- _RegEnumKey Link to comment Share on other sites More sharing options...
Developers Jos Posted March 1, 2009 Developers Share Posted March 1, 2009 (edited) And how can I change the referrer? I would like to use File-Loader as Referrer.You totally lost me... why ? what is a fileloader?Jos Edited March 1, 2009 by Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Valik Posted March 1, 2009 Share Posted March 1, 2009 Show me the column header for that column you show in your screenshot. If it doesn't say "user-agent" then you have a piece of shit software written by people who don't know how HTTP works. Hint: It's called USER AGENT. The referrer is something completely different. Link to comment Share on other sites More sharing options...
Robjong Posted March 1, 2009 Share Posted March 1, 2009 (edited) Edit: Go with the UDF in the next post, its more complete Hey,Thats the UserAgent, anyway this should work in most cases.expandcollapse popup_INetGetEx("http://www.autoitscript.com/index.php", @ScriptDir & "\test.txt", True, "AutoIt3Script", "Referrer") ;================================================================================ ; Function Name....: _INetGetEx ; Description......: Download a file from the net ; Syntax...........: _INetGetEx($sURL, $sFile[, $fOverWriteCreate = Default[, $sUserAgent = Default[, $sReferrer = Default]]]) ; Parameter(s).....: $sURL - The URL of the file to download ; $sFile - The local path to save the file to ; $fOverWriteCreate - Set to True to overwrite existing file ; $sUserAgent - The User-Agent (http://en.wikipedia.org/wiki/User_agent) ; $sReferrer - The Referrer (http://en.wikipedia.org/wiki/Referrer) ; Return Value(s)..: Success: 1 ; Failure: 0 ; sets @error to non-zero and @extended to the returned HTTP Status ; @error = 1: $fOverWriteCreate is False and file already exists ; @error = 2: Somethng went wrong with the download ; Requirement(s)...: - ; Related..........: - ; Limitation(s)....: - ; Example(s).......: - ; Comment(s).......: http://www.paulsadowski.com/WSH/getremotebinaryfile.htm ; Author(s)........: Robjong ; Modified.........: - ;================================================================================ Func _INetGetEx($sURL, $sFile, $fOverWriteCreate = Default, $sUserAgent = Default, $sReferrer = Default) ;~ Local $adTypeBinary = 1, $adSaveCreateNotExist = 1, $adSaveCreateOverWrite = 2 Local $iSaveCreateOverWrite = 1 If $fOverWriteCreate Then $iSaveCreateOverWrite = 2 If $fOverWriteCreate <> 2 And FileExists($sFile) Then Return SetError(1, 0, 0) If Not $sUserAgent Or $sUserAgent <= -1 Or $sUserAgent == Default Then $sUserAgent = "AutoIt3Script" ; AutoIt If Not $sReferrer Or $sReferrer <= -1 Or $sReferrer == Default Then $sReferrer = "" Local $oHTTP = ObjCreate('WinHTTP.WinHTTPRequest.5.1') $oHTTP.Open('GET', $sURL, False) If $sUserAgent Then $oHTTP.SetRequestHeader("User-Agent", $sUserAgent) If $sReferrer Then $oHTTP.SetRequestHeader("Referrer", $sReferrer) $oHTTP.Send() Local $oBinaryStream If $oHTTP.Status == 200 Then ; 200 = OK $oBinaryStream = ObjCreate("ADODB.Stream") $oBinaryStream.Type = 1 $oBinaryStream.Open $oBinaryStream.Write($oHTTP.ResponseBody) $oBinaryStream.SaveToFile($sFile, Int($iSaveCreateOverWrite)) $oBinaryStream.Close Return SetError(0, 0, 1) EndIf $oBinaryStream.Close Return SetError(1, $oHTTP.Status, 0) EndFunc ;==>_INetGetEx Edited March 1, 2009 by Robjong Link to comment Share on other sites More sharing options...
monoceres Posted March 1, 2009 Share Posted March 1, 2009 (edited) I bet it's the user agent, maybe try an UDF that allows you to specify your own agent?http://www.autoitscript.com/forum/index.ph...&hl=WinInetEdit: Too damn slow. Edited March 1, 2009 by monoceres Broken link? PM me and I'll send you the file! Link to comment Share on other sites More sharing options...
Tiger Posted March 1, 2009 Author Share Posted March 1, 2009 Sry. autoit is browser, and i would like to change that in another name My UDFs:- _RegEnumKey Link to comment Share on other sites More sharing options...
James Posted March 2, 2009 Share Posted March 2, 2009 AutoIt is not the browser. Oh dear lord. Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
BrettF Posted March 2, 2009 Share Posted March 2, 2009 (edited) So how thick is his skull? Place your bets now... EDIT: And I imagine the person that wrote that is saying that the user agent is the browser? Edited March 2, 2009 by BrettF Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! Link to comment Share on other sites More sharing options...
James Posted March 2, 2009 Share Posted March 2, 2009 So how thick is his skull? Place your bets now...You should feel embarrassed and shuffle off sheepishly.Aimed at OP Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
Valik Posted March 2, 2009 Share Posted March 2, 2009 Blame the OP for not being able to keep columns straight. Blame the crappy software for making an over-generalization and considering every client a browser which is patently retarded. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now