Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by Superwayne · Mar 16, 2014 at 12:44 PM · webpageftpgame save

Using free webhoster to store data?

Hey,

I've made a 2D platformer with a level editor for custom levels (saving the levels as xml files). Now I want to allow the player to share his custom levels with everyone else. I want to host my game on different sites like gamejolt, newgrounds, kongregate etc. Some of them offer a database to store the users levels but this comes with some problems: - Some sites like newgrounds don't have an api for unity yet - Every site uses different databases (gamejolt can store strings, kongregate just numbers etc.). - And the most important: The savestates wouldn't be available from every site. I want the player to share his levels independent from the site he is playing on.

Cause of this I wanted to store the levels on a independent server but I can't afford a paid one. Therefore I made an account on 000webhost.com. Now I just have one question left: How can I access the server to store the xml files? I need to save files and also browse through existing files to load a level.

Can anyone tell me how I can access the server from unity? I know 000webhost offers ftp to upload files but as far as I know Unity doesn't support ftp anymore, right? Can I write an html page which can be accessed from unity and does the save/load process on the server?

If there is already an answer on this it would be nice if you could tell me the link. My searches were without helpful results..

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

1 Reply

· Add your reply
  • Sort: 
avatar image
4
Best Answer

Answer by Jlu · Mar 16, 2014 at 02:58 PM

For sending the .xml files, you want to use Unity's WWWForm class: https://docs.unity3d.com/Documentation/ScriptReference/WWWForm.html

The Unity's example found on that page will also explain, that you'll want to have a server-side script (in this case, written with Perl) to handle the file saving on the server-side.

In your case however, you'd want to use PHP (since 000webhost.com supports PHP, not Perl). For PHP file uploading, there is a tutorial here: http://www.tizag.com/phpT/fileupload.php

To recap, use WWWForm to send the files and PHP to receive them to the server.

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Superwayne · Mar 16, 2014 at 04:43 PM 0
Share

Thanks! This is exactly which I needed to know without trial and error 10 different methods and wasting hour after hour :D

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

22 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

.unity3d file gets deleted automatically from FTP clients 1 Answer

Is it possible to send and recieve data from/to a MySql server? 4 Answers

Unity - JavaScript, it takes screen shot but doesn't post(form) to server. it works fine with pc (web cam) but not on android device. is it because of resolution???? 0 Answers

FTP Upload Files 2 Answers

Mac OS X: Build crashes 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges