Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 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 WirealTalha · Mar 04, 2019 at 03:24 AM · timephphosting

Xampp, internet time, php hosting [Help Needed Urgent Please]

Hi im creating a simple unity game. I'm implementing Internet time to stop players from cheating. SO far i have installed Xampp and started hosting a php file locally. works excellent on unity editor on pc but when i install apk on mobile, nothing happens.

What am i doing wron? please someone put me in the right direction.

Comment
Add comment · Show 8
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 kaarloew · Mar 04, 2019 at 07:06 AM 0
Share

So problem is that when you run the game in your mobile device it cannot connect to the server running in your local pc?

avatar image WirealTalha kaarloew · Mar 04, 2019 at 08:18 PM 0
Share

Yes mate. Exactly. What am i doing wrong? I know i am giving the wrong url to the script. What should i do?

avatar image WirealTalha WirealTalha · Mar 04, 2019 at 08:20 PM 0
Share

I might actually end up using playfab's server to access Internet Time Using Server.GetTime function.

avatar image Hellium · Mar 04, 2019 at 07:24 AM 1
Share

OBVIOUSLY, If you have a local server, and if you haven't set it up so that it can be accessed from the web, your mobile phone can't access it....

avatar image WirealTalha Hellium · Mar 04, 2019 at 08:19 PM 0
Share

i know mate, But HOW do it set it up?

avatar image Hellium WirealTalha · Mar 04, 2019 at 08:32 PM 0
Share

Unless you plan to keep your personal computer on 24h/24, you will have to rent a server.

If you really want to use your Xampp as a server, you will have to ask this on the appropriate forum. Unity Answers is not meant to explain you how to set up any other software.

Show more comments

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by MusicBoxx · Mar 04, 2019 at 11:29 AM

I have a feeling that if you want to use the "apk" file, you should use Unity 5 Remote

because if it's an APK file on your Android phone then obviously your phone can't find the server from your computer. You could also check out Free SQL Database in order to test your game on an Android device.

Comment
Add comment · Show 2 · 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 WirealTalha · Mar 04, 2019 at 08:24 PM 0
Share

But what happens when the game goes live? SO far,

1) installed Xampp software. 2) turned apache and the second option to start. 3) saved Time code in a php file at c:xampp/tcf_seomthing_folder/NewFolder/Php_file 4) went to chrome typed localhost/NewFolder/Php_file

output was phpfile code output (Current Time)

then i copied that (4) address i.e "localhost/NewFolder/Php_file"

and put that in my Time$$anonymous$$anager Script in unity. Obvs its not going to work on mobile . as the url is wrong.

Where do i go from here??

avatar image MusicBoxx WirealTalha · Mar 05, 2019 at 07:23 AM 0
Share

You need to upload it to a real web server. I think every developer, beginner or advanced should have his own website for portfolio. It's very useful when you will apply for jobs and it's better than just to throw GitHub links. You could rent / buy a domain with $$anonymous$$ySql server, without Xampp.

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

103 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 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 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 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 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

`Recv failure: Connection was reset` In editor? (platform set to Android NOT WebPlayer) 0 Answers

What kind of hosting is required to host a MMO server? 1 Answer

UNet - When the host is ended all clients are kicked to lobby scene, how do I stop this? 1 Answer

Stop host without kick clients 1 Answer

How do I format a string into days:minutes:hours:seconds? 6 Answers


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