Learn:
_FileReadToArray
https://www.autoitscript.com/autoit3/docs/libfunctions/_FileReadToArray.htm
Random
https://www.autoitscript.com/autoit3/docs/functions/Random.htm
UBound
https://www.autoitscript.com/autoit3/docs/functions/UBound.htm
Then read over this.
Global $Referrer
Local $ReferrerFile = "Referrer.txt"
Local $ReferrerExists = FileExists($ReferrerFile)
If $ReferrerExists Then
_FileReadToArray($ReferrerFile, $Referrer, 0, "")
Else
MsgBox(0, "Referrer - Setup Error", "The file Referrer.txt doesn't exist.")
Exit
EndIf
If UBound($Referrer) = 0 Then
MsgBox(0, "Referrer - Setup Error", "The file Referrer.txt is empty.")
Exit
EndIf
Local $oIE = _IECreateEmbedded()
Local $hoIE = GUICtrlCreateObj($oIE, 8, 8, 500, 500)
$oIE.Navigate2("https://www.whatismyreferer.com/", Default, Default, Default, 'User-Agent: CustomBrowser' & @CRLF & 'Referer: ' & $Referrer[Random(0, UBound($Referrer) - 1, 1)])
GUICtrlDelete($hoIE)
Everything you need is in that code.
Read it understand it and reuse it.