Welcome! Log In Create A New Profile

Advanced

A Small Project I Need Help With

Posted by InTrepidCognito 
A Small Project I Need Help With
June 17, 2010 03:31AM
Alright, this is a pretty simple part of a project I'm hoping to design, and it's not that extensive (or at least I don't think it'll be).

I need to know how to get the Wii to open an XML file from a server, then (optionally) edit a fixed different one.

Example:

1. Init WiFi
2. Load and open 1.xml from a server
3. If a part of 1.xml contains "2," ask if the user wants to edit 2.xml
If Yes:
4. Load and edit 2.xml from the same server
5. When done, repost the edited 2.xml to server
If No:
4. Exit to HBC

I know it sounds weird, but please bear with me here, I've got the main idea in mind, I just don't know how to do that^^

Also, I don't know the limitations of file loading on Wii, so is there a certain website I should upload it to, or can I use, say, Google Code or Freewebs?

Thanks for the support, and sorry for being a coding noob. :P

P.S. WHAT triggers that pirate animation when trying to post? I'm not using Limewire or anything, wtf?
Re: A Small Project I Need Help With
June 17, 2010 03:45AM
Well no ones going to write the entire program for you. If you have specific questions regarding writing it though, feel free to ask.

Regarding file access limitations: There shouldn't be any.

Regarding the cause of the pirate animation: Reading fail. You need to click a check box agreeing promising not to post content related to piracy before starting a topic. If you don't check it, you get a warning that pops up telling you to check it. If you ignore the warning and try to post anyways, you're redirected to the animation.
Re: A Small Project I Need Help With
June 17, 2010 03:59AM
Yeah... thanks.

This is only a portion of it, like I said, I just don't know how to open an xml.

And yes, I can read. I think I forgot to re-tick the box after I previewed the post. Don't you think I would've read that if I actually got a message posted on here?
Re: A Small Project I Need Help With
June 17, 2010 10:55AM
Reading and modifing XML isn't that hard with TinyXML: [wiibrew.org]
Downloading a file is a bit tougher, but there is an example http.c which does a HTTP1.0 request.
Uploading a file is a once again a bit tougher. No real examples, and if you want to use some external service like freewebs than it's even harder.

You say you aren't that experienced with coding, at which I say the following. You might want to consider a different project. The difficulty of network programming, combined with a lot of different techs (HTTP, XML, TCP, some random internet webpage containing javascript? php?) makes this not an easy feat for the unexperienced.
Re: A Small Project I Need Help With
June 17, 2010 06:38PM
Thanks for the input, Daid, I think I've got it now (besides reuploading).

But where on the internet should I store the XML? A lot of homebrew apps have dedicated servers to hold things, so where can I do that?
Re: A Small Project I Need Help With
June 17, 2010 07:19PM
Quote
InTrepidCognito
Thanks for the input, Daid, I think I've got it now (besides reuploading).

But where on the internet should I store the XML? A lot of homebrew apps have dedicated servers to hold things, so where can I do that?

This depends on what you want to do. The only real way to copy the file is through ftp. But if you have you're own hosting and access to php I would create a simple php file that you could send the XML and recreate. i.e.

pseudo code

mysite.com/savemyxmlfile.php?contents=[put the xml file contents here]

in savemyxmlfile.php
...
$mycontents = $GET['contents'];
....
create file
write $mycontents to that file.

If you don't have a host and are wanting to upload to a free storage site then you'll need to figure out their protocol.
Re: A Small Project I Need Help With
June 18, 2010 12:44AM
Id use SMB and start with the source for wiixplorer.

[code.google.com]

all the code you need to access the remote. Plus many of the file operations.
Re: A Small Project I Need Help With
June 18, 2010 07:46PM
But then, it's maintained on my personal computer, right?

I guess I'll need to get a good virus protector if my project will be used...
Re: A Small Project I Need Help With
June 18, 2010 08:05PM
I wouldn't advise using SMB, unless you want each user to have their own XML or something. Use a public host. Don't what to advise, Google Code may be a good idea.
Sorry, only registered users may post in this forum.

Click here to login