Difference between revisions of "User:Dee/How not to act"
From HashVB
< User:Dee
(Added a breif description) |
|||
(3 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
− | This is a prime | + | This is a prime example if how NOT to get help: |
+ | |||
+ | This Guy wanted to be able to download a file into a string buffer, but the server checked the user agent. | ||
+ | Using the Inet API and the code on [[WebGet|our wiki]] solves exactly his problem. | ||
<pre> | <pre> |
Latest revision as of 06:45, 16 August 2007
This is a prime example if how NOT to get help:
This Guy wanted to be able to download a file into a string buffer, but the server checked the user agent. Using the Inet API and the code on our wiki solves exactly his problem.
22:38 -!- Irssi: Starting query in Undernet with Norxanizia 22:38 <Norxanizia> Look, I have tested that way... it only gets absolute files that ACTUALLY exist 22:38 <Norxanizia> This file is server side generated 22:38 <Norxanizia> URLDownloadToFile WORKS 22:38 <Norxanizia> Inet.OpenURL DOES NOT 22:39 <QueenDee> ok, I will let you back in #vb IF you answer what I ask, ok? 22:39 <Norxanizia> fine 22:39 <Norxanizia> but this had better be worth it 22:39 <Norxanizia> don't play with my time 22:39 <QueenDee> as I DO know what i am going on about 22:39 <QueenDee> my job is to screw around with cameras over HTTP 22:39 <Norxanizia> well from my perspective - I just don't see it 22:40 <QueenDee> just trust me 22:40 <Norxanizia> lol 22:41 <QueenDee> one momentg 22:42 <QueenDee> someone set teh ban in X 22:42 <QueenDee> just removing it 22:42 <QueenDee> ok, in here will do 22:42 <Norxanizia> lol 22:42 <QueenDee> someone else wont remove teh ban after you abusing him 22:43 <Norxanizia> i can give you the link in question if you don't believe inet.openurl WIll not work! 22:43 <QueenDee> ok, what is the URL, what are you exopecting it to return and what are you really getting? 22:43 <QueenDee> just bear with me, even if you think its stupid 22:43 <Norxanizia> But it's not my question! 22:43 <QueenDee> then what is the problem? 22:43 <QueenDee> InternetDownloadtofile NEEDS to downlaod to a file 22:43 <QueenDee> and the inet api WILL be able to get this file you think it cant 22:44 <Norxanizia> my question is how to get this api to write to a fake file in memory instead of a real file 22:44 <QueenDee> I asked you to answer my questions 22:44 <Norxanizia> LINK... 22:44 <Norxanizia> http://willie.ess.tv:11411/index.html 22:44 <QueenDee> InternetDownloadtofile is NOT the answer 22:44 <QueenDee> ok? 22:44 <Norxanizia> You WILL NOT be able to get index.html to download using INet.OpenURL 22:45 <QueenDee> you are awar that that is a broken http server? 22:45 <Norxanizia> it's not broken 22:46 <QueenDee> well, its not returnifn HTTP 22:46 <Norxanizia> I don't care about any of this 22:46 <Norxanizia> I go to that link in FF and it gives me what I need 22:46 <QueenDee> InternetDownloadtofile is just awrapper for the inet api so WILL work 22:46 <Norxanizia> I use OpenURL is does not 22:47 <Norxanizia> I use URLDownloadToFile and it does 22:47 <QueenDee> I never said to use the inet control 22:47 <QueenDee> l 22:47 <Norxanizia> SO tell me... has this been a waste of my time like I said? 22:47 <QueenDee> its crap 22:47 <Norxanizia> 10:43pm <QueenDee> and the inet api WILL be able to get this file you think it cant 22:48 <QueenDee> yes... 22:48 <QueenDee> notice where I say "inet api" rather than "inet control" 22:48 <Norxanizia> On this earth I can for certain state that you are a waste of space 22:49 <Norxanizia> But more importantly... a waste of my time 22:50 <QueenDee> thats a shame because teh inet api works 22:50 <QueenDee> ?strconv(data,vbUnicode) 22:50 <QueenDee> ICY 400 Server Full 22:50 <QueenDee> icy-notice1:<BR>SHOUTcast Distributed Network Audio Server/Linux v1.9.5<BR> 22:50 <QueenDee> icy-notice2:This server has reached its user limit<BR> 22:50 <Norxanizia> Exactly... BROKEN 22:50 <Norxanizia> THAT IS NOT THE FILE 22:50 <Norxanizia> I HAVE STATED THIS A THOUSAND TIMES 22:50 <QueenDee> thats what teh server is returning... 22:50 <Norxanizia> DOES IT FUCKING LOOK LIKE HTML!? 22:50 <Norxanizia> I HAVE SAID THAT INET RETURNS SOMETHING ELSE BEFORE 22:50 <Norxanizia> OVER AND OVER 22:50 <QueenDee> so, I return to my originalk question 22:51 <QueenDee> what are you expecting? 22:51 <Norxanizia> You can GET FUCKED 22:51 <Norxanizia> OK? 22:51 <Norxanizia> Your questions have done JACK SHIT 22:51 <QueenDee> I haven't finished yet 22:51 <Norxanizia> And your EGO is about to EXPLODE 22:51 <QueenDee> my egos about to gp to sleep 22:52 <Norxanizia> I have said a THOUSAND times that I am after the HTML that FF see's 22:52 <QueenDee> fancy carrying on till a conclusion or can't you be arsed any more? 22:52 <Norxanizia> INET api/control whatever THE FUCK you want to call it- WILL NOT WORK 22:52 <QueenDee> ok, give me a second 22:53 <Norxanizia> Whats more, fuck this 22:53 <Norxanizia> I want an apology 22:53 <Norxanizia> For all those times you have asked 'what for' and 'what are you getting' and all that shit 22:54 <Norxanizia> kicking me even when I said it was irrelevant 22:57 <QueenDee> do you want my answer as I know EXACTLY what the problme is 22:58 <Norxanizia> go ahead... but I can guarentee you I already know what it's gonna be 22:58 <QueenDee> what do you think it is? 22:58 <Norxanizia> That inet cannot get the file 22:58 <QueenDee> no 22:58 <QueenDee> you just need to fake the IE user agent. 22:58 <Norxanizia> But URLDownloadToFile already WORKS 22:59 <QueenDee> yes, becuase it uses IEs user agent string 22:59 <Norxanizia> thats fine but at least I don't have to code that 22:59 <QueenDee> its adding an extra header line 22:59 <QueenDee> that simple 23:00 <QueenDee> $ wget http://willie.ess.tv:11411/index.html -U "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.8.0.4) Gecko/20060508 Firefox/1.5.0.4" 23:00 <QueenDee> HTTP request sent, awaiting response... 200 OK 23:00 <QueenDee> Length: unspecified [text/html] 23:00 <QueenDee> $ wget http://willie.ess.tv:11411/index.html 23:00 <QueenDee> HTTP request sent, awaiting response... 200 No headers, assuming HTTP/0.9 23:00 <QueenDee> Length: unspecified 23:00 <Norxanizia> you do realise this is VB and not linux? 23:00 Norxanizia [~Bobblejac@87.112.9.212.bbplus.ptn-ag1.dyn.plus.net] requested CTCP VERSION from QueenDee: 23:02 <Norxanizia> You don't actually have a solution do you? 23:02 <Norxanizia> Your just telling me what have known for HOURS 23:02 <QueenDee> yes, its passing the user agent string in the additional headers 23:02 <QueenDee> yes, I tested it under linux 23:03 <QueenDee> vb, sorry 23:03 <Norxanizia> Look, I already know all this ffs... I have done for a loong time 23:03 <Norxanizia> You have yet to present a way of getting THAT file into memory 23:03 <Norxanizia> without the need to make files 23:03 <QueenDee> fuck you then 23:04 <QueenDee> ive told you 3 times 23:04 <Norxanizia> Finally 23:04 <QueenDee> USE 23:04 <QueenDee> THE 23:04 <QueenDee> FUCKING 23:04 <Norxanizia> No you have told me what I already KNOW! 23:04 <QueenDee> USER 23:04 <QueenDee> AGENT 23:04 <Norxanizia> YOU CANT ON THAT FUNCTION 23:04 <QueenDee> AS SOON AS YOU SET THATY 23:04 <QueenDee> IT ALLWORKS! 23:04 <QueenDee> you can using the inet api 23:04 <Norxanizia> Where the hell is the option for that? 23:04 <QueenDee> www.vbip.com 23:04 <QueenDee> there are plentyr that explain the api there 23:04 <Norxanizia> bollox are there 23:05 <Norxanizia> your just sending me on another fucking wild goose chase 23:05 <Norxanizia> your a disgrace 23:05 <QueenDee> my code unfoirtunatley belonds to my employer 23:05 <QueenDee> lazy fuck 23:05 <Norxanizia> like fuck it does 23:05 <QueenDee> its even on our site 23:05 <QueenDee> http://hashvb.earlsoft.co.uk/WebGet 23:06 <QueenDee> the user agent is passed to internetopen 23:06 <Norxanizia> what does that have to do with AAAANYTHING 23:06 <Norxanizia> When URLDownloadToFile is like 4 lines long 23:06 <QueenDee> abart form doing what you want? 23:06 <QueenDee> yes, but DOES NOT do what you want 23:06 <Norxanizia> My original today WAS NOT how to get this file 23:06 <Norxanizia> *question 23:06 <QueenDee> oh well 23:06 <Norxanizia> IT was HOW TO MAKE A FILE BUFFER 23:07 <Norxanizia> As I have said TIME AND TIME AGAIN 23:07 <QueenDee> YOU CAN NOT DO THAT with internetdownloadtofile 23:07 <QueenDee> goodbye 23:07 <QueenDee> you have your answer 23:07 <Norxanizia> I HAVE BEEN TOLD YOU CAN 23:07 <Norxanizia> Your just an ass
Half an hour of my life wasted, as he said...