GLBasic forum

Main forum => GLBasic - en => Topic started by: fjsantosb on 2010-Apr-06

Title: NetWebGet - Bad Access - iPhone
Post by: fjsantosb on 2010-Apr-06
Hi there,

When I use command 'NetWebGet' i get 'BAD ACCESS' on iPhone (it works well on pc).

Can anyone help me?

King Regards, fjsantos.
Title: Re: NetWebGet - Bad Access - iPhone
Post by: Kitty Hello on 2010-Apr-06
post the exact syntax and path (for the local file), please.
Title: Re: NetWebGet - Bad Access - iPhone
Post by: fjsantosb on 2010-Apr-06
Hi Gernot,

The sintax is:

- GLOBAL SERVERURL$ = "http://proyectos.signo-net.com";
- LOCAL path$ = "/exodus/api/iphone-1-0-0.php?id=" + id;
- NETWEBGET(SERVERURL$, path$, 80, "");

What can be the problem?

Thanks in advance Gernot!

King Regards, fjsantos.
Title: Re: NetWebGet - Bad Access - iPhone
Post by: Kitty Hello on 2010-Apr-06
you can't write to that directory.
Use PLATFORMINFO$("DOCUMENTS") or read to a string with NETWEBGET$()
Title: Re: NetWebGet - Bad Access - iPhone
Post by: fjsantosb on 2010-Apr-06
Hi Gernot,

Thanks for your fast response, I know about the use of platforminfo$, but what parameter on NetWebGet$, indicates where to write to?
In other hand, i don't want to save the response anywhere, it is only to insert data on DB.

King Regards, fjsantos.
Title: Re: NetWebGet - Bad Access - iPhone
Post by: Moru on 2010-Apr-06
The last parameter in the call is the location of the file to write to. I can imagine that a filename of "" might give troubles on some platforms. If you don't care about the downloaded page, just use NETWEBGET$ instead, that will download into a string instead of writing to the harddrive. I believe that you can set max length to download too.
Title: Re: NetWebGet - Bad Access - iPhone
Post by: fjsantosb on 2010-Apr-07
Hi Moru,

Thanks! That exactly what i was looking for! (It was my mistake i use 'NETWEBGET' without '$'!).  =D
It's working now!

Thanks for your response!

King Regards, fjsantos.
Title: Re: NetWebGet - Bad Access - iPhone
Post by: Ozden79 on 2010-Apr-08
Hi There,

I want to download a few files from my server to IPhone, basically a definition file and a few image files where I'll use to show the upcoming games. Can I use NETWEBGET for that as it seems they are used to download text? Also, is there 2 different commands as NETWEBGET$ and NETWEBGET or am I wrong?

Thanks,

Özden
Title: Re: NetWebGet - Bad Access - iPhone
Post by: Kitty Hello on 2010-Apr-08
Yup.
Just download with NETWEBGET to the directory PLATFORMINFO$("DOCUMENTS").
The NETWEBGET$ (with dollar) downloads to a string instead of a file.
Title: Re: NetWebGet - Bad Access - iPhone
Post by: Ozden79 on 2010-Apr-08
Great, thanks...