ReceiveHTTPFile doesn't give text

Just starting out? Need help? Post your questions and find answers here.
WilliamL
Addict
Addict
Posts: 1253
Joined: Mon Aug 04, 2008 10:56 pm
Location: Seattle, USA

ReceiveHTTPFile doesn't give text

Post by WilliamL »

I used to run this and got text but now I get (see below). How do I get the text?

Code: Select all

  Filename$ = SaveFileRequester("Where to save txt file", "", "", 0)

  If ReceiveHTTPFile("http://finance.yahoo.com/q?s=%5EDJI", Filename$)
    Debug "File recieved and written to disk. If the remote file was not found, it will contains the webserver error."
  Else
    Debug "No file recieved (network error)."
  EndIf
output

Code: Select all

ãÏ}i{„∂µÁ€_¡xû§v+—‹πNÓ¨ôifÎxí‹4O^?	IS¢LR≤e◊ˇ˝=XHÇ$(J∂<uÔuñëÄÉ≥„¯€7AÏg´9í&Ÿ4˙˛O√Ië7Ô°YˇÁì=)õ†):fiã¬Ò$€ì/Û˙~≈I?ı+_¸»K”„Ω•gY<óf(ÓèÑf“»£‘°ΩÔˇ$¡?õ /†?…„eû‰Oº$EŸÒfi"ıùΩ˙ÁôáZÜËb'∏≠xñ°øÉlr†eË£>yËI·,ÃB/Dzy:V[Ä≈^6å>∞Äı'q É∆fl‰ï7âcŸèß<î(úùI	ä阶fi,!\m톗Òfia˛B˛í∆3ÆŒü˛Îøh5ZNñY(KOΩ˘¸0úNô7åP˛Vìüœ_º¸«ooˇGˆ”tè6ñf´•Ñ2ººßA*ÎüfiΩùh”A|
ìà˘≈GœO>ÖÍnÄæÖ¢Ú’áwösÒ˘∑›Ä|Û)õ˝Â©ä^̉4\åÂg»ILˇ„ª›¿|∂»2ËËã’«ó˙Úa7@OPѸL~˛ã˘ÒÈØ'ˆéH…˜„$„ŸõM¡<Õˇ˘^€Qá/¬Ãü»œ¸)z{ˆÀé(‡≥7LÂÁ?˝™_˛˝Õ”Åå„(
MacBook Pro-M1 (2021), Sequoia 15.4, PB 6.20
BarryG
Addict
Addict
Posts: 4219
Joined: Thu Apr 18, 2019 8:17 am

Re: ReceiveHTTPFile doesn't give text

Post by BarryG »

Probably the same situation as here -> https://www.purebasic.fr/english/viewtopic.php?t=80352
infratec
Always Here
Always Here
Posts: 7662
Joined: Sun Sep 07, 2008 12:45 pm
Location: Germany

Re: ReceiveHTTPFile doesn't give text

Post by infratec »

I get a readable file with PB 6.11B3 x86 on WIn10 X64.
User avatar
Kiffi
Addict
Addict
Posts: 1509
Joined: Tue Mar 02, 2004 1:20 pm
Location: Amphibios 9

Re: ReceiveHTTPFile doesn't give text

Post by Kiffi »

infratec wrote: Thu May 30, 2024 9:09 am I get a readable file with PB 6.11B3 x86 on WIn10 X64.
same here with PB 6.11B3 x64
Hygge
WilliamL
Addict
Addict
Posts: 1253
Joined: Mon Aug 04, 2008 10:56 pm
Location: Seattle, USA

Re: ReceiveHTTPFile doesn't give text

Post by WilliamL »

Thanks for the link BarryG. Interesting but no solutions.. but I will look into using the webgadget.

It's odd that it used to work (everytime) and I think that it does work sometimes. It is also interesting that it is working in Windows.

I suppose it could be a bug on the Mac.

[Update]

I used

Code: Select all

http://finance.yahoo.com/q?s=%5EDJI*.gz
and it worked... and, today, it works without it! Go figure. :shock:
MacBook Pro-M1 (2021), Sequoia 15.4, PB 6.20
Post Reply