Codea Connecting/Referencing other iDevices with same app?

Hello friends! So I am an amateur Codean and I wanted to make a (relatively) simple app for a program at my school. The program “SafeRide” features 4 high school students who take calls from drunk teenagers at parties, log the calls, and pick the drunkin folk up and drive 'em home so they don’t cause car accidents.

I want to make an app that has 2 parts. The app a one time input of the persons first and last name and their home address. Then there would be 2 big buttons (one for a SafeRide worker and one for someone who wants to be picked up). The pickup button would then ask for their current address and it would then send the name of the person, their current address, and their home address to a que readable to someone who has selected the ‘worker’ button.

My question: is it possible to send information out to some database on the internet, and then read it back with another iDevice? If so, how? (Other than that the app seems pretty simple and doable) Thank you :slight_smile:


Not at the moment. It sounds like you’re trying to describe sockets, which (I can’t remember which) were removed from Codea on Apple’s request, or weren’t added due to Apple disallowing it. You can use http.request, but it’ll take a few seconds to work, and would require you owning a website and doing some serverside programming.

Oh apple you ruiner of dreams and visions

Well thank you skyCoder :slight_smile:

Sockets have been highly requested for a long time, and would make an infinite number of amazing multiplayer projects possible… Hopefully, sometime Apple will allow it. I’ve had so many dreams of multiplayer games…

@SkyTheCoder - Apple rejected a copy of Codea with sockets. @Simeon hasn’t added it back because he felt the API wasn’t very Lua-like, so if he was to add it, he would change it a bit.

And the answer to your question is there doesn’t seem to be a need for sockets. Look at http.request.

@SkyTheCoder, you don’t need sockets to do what he wants to do. Just a little php server and some http.request calls will do it just fine.

@jakAttak: can you recommend some sites/further reading? I don’t know php aha

@Invad3rZIM, you are going to need to learn some PHP to create a simple script that stores data you send it on the server, and another script that sends back the data you request.

then you can send and retrieve the data using http.request in Codea.

To learn some PHP, I recommend checking out W3 schools and Codecademy.

Once you know enough to make your two scripts, search around these forums if you need help using http.request to send and recieve data.

Hope this helps!

@Zoyt @JakAttak Sorry, I think I was in a rush when I posted that, and I skimmed it and thought he was talking about multiplayer games.