Sending data to a web Server - ios

I've created a program that send's a data to a webserver. I used the NSURLConnection to send the data to the web server. I've created a php file on my server to handle all the POST request from the iPhone. My question was are there any other ways to send the data to a web Server besides using WiFi connection. I just only need to send small data.

are there any other ways to send the
data to a web Server besides using
wifi connection
Yes, EDGE and 3G

Related

Rails. using a web socket like rest, but with an open connection

I have a web api that posts json to different external endpoints on certain conditions. We have a new client that wants us to open a web socket connection with them during an event, send them the data (json) when we get it via this socket, and close the socket after the event. I'm having a hard time figuring out the rails way to do this.
How do I open a web socket connection and keep it open? (basically where would the client sit/ what would the definition look like).
How do I send messages over the socket from a controller? (eg. after processing a post request send new data to this websocket)
How do I close the connection?
You can try using this gem called Faye. Here's an example for connecting and sending data: (note: I didn't test it)
# Open the connection
ws = Faye::WebSocket::Client.new('ws://www.example.com/')
# Send data to connection
ws.send(YOURJSONDATA)
# Close connection (RFC 6455)
ws.close
Notes for faye:
Using the WebSocket client
Adding headers and other options to connection
WebSocket API
RFC 6455
Hope it helps!

How to connect sql server with Objective-c

I need to connect my IOS app with sql server 2008 to do a Login and register button.
Instead of this you can use webservices, from webservice you can send data to server. Perform operations on server and send back result from server to mobile.

Secure connection between app and server

I would like an iOS app to send data to my web server. For now I issue http get requests like "http://myserver.com?key1=val1&key2=val2" and it works fine
However I would like to secure this a bit so that people don't proxy the requests and send random values to my server.
If I do https, I understand that I generate some private/public keys on the server side, and I have to give those to the app, so that only the app can sign the requests and the server will reject any requests not coming from my app. Is that correct ?
If that's true, is there a way to hide the certificates in the iOS app ? When opening an app on a computer we can see all the files. Could anyone replicate the request with those ?
Thanks
On server side you maintain client app unique identifier and one key(pwd) value while installing app and client also maintain that information.Every time client send request with these parameter and server check this parameter with database.

Check Page Request Source

Working on a data collection application using mobile sms.
when a customer send a sms lets say
SMS content
Demo CET 100-50030-2320-1000
when the sms reach the mobile serive provider it send a GET request on my server
http://domainname.com/demo.aspx?mno=9828958745&sms=CET+100-50030-2320-1000
Now the problem is some hackers are sending GET request from there PC browser and all the data is getting missed and server is getting overload
I want to know which request is from a computer(mobile server) and which are from browser.
thanks in advance
Regards
Check if the request for a page is coming from a server not a browser.
If your service is not meant to be accessible publicly you have to protect it instead of publishing it on the internet. Some wasy to protect it:
HTTP Authentication
IP restrictions in firewall.
IP restrictions in the service.
Virtual Private Network.

Asynchronous Socket Programming

I've created a project using socket programming. If I connect a single client to my server, the data I send from my client is successfully received by the server. But whenever I connect more than one client, only one client's data is received by the server. The other clients fail to connect. How can I make the server accept all new incoming connections, and how can I make the server receive two files from the same client?
If your code uses BeginAccept, EndAccept methods to accept new connection asynchonously, don't forget to call again BeginAccept after EndAccept call in your AcceptCallback.
Regards

Resources