Click to See Complete Forum and Search --> : PUT to a phone with PHP?


auxone
08-09-2008, 03:03 PM
Hey, guys. Me again.

I am a little shaky on what exactly happens during an HTTP transfer. Basically, I am trying to get a phone to communicate with my webserver on a PHP page but I am not sure of the phones capabilities. I know the phone can POST and GET to and from my site, that is basically built into any smartphone. During both operations the phone is the 'active' participant, so to say.

The confusion comes with I try to envision how I can send things to the phone, without asking it to be the active participant and GET the info. I want to PUT it there. Have any of you guys heard of PUTing to a phone, or do I have to GET it everytime? I guess it feels weird to me because I have no idea what type of URI a phone would have, or how to PUT to it without it first making the connection by asking for something.

Maybe I just can't think in these terms. Thanks!

\\.\
08-10-2008, 04:54 AM
If your phone is able to surf the internet then your able to call a page from that server.

I have a script I call from my phone that tells me the phones current allocated IP address.

All I do is put the http address in the address bar and request it, the page is then displayed with just my IP address. It is not ment to do much other than confirm that I can request php pages to my phone.

You will need to play around with your phone and see what your restricted to. I say this because on my other phone I can not request pages outside the phone network providers servers.

auxone
08-10-2008, 10:24 AM
Yes, I know I can call pages from my phone. That is what I was saying in the original post. My question is how can I get the URI of the phone and some how PUT a resource from my webserver TO the phone without me GETing it from the phone. Know what I mean?

Thanks for the response.

chazzy
08-10-2008, 11:47 AM
You'll need some kind of push accepting software on the phone (likely something that you would write yourself).

As for how, it really depends on the phone. If you look at things like the iPhone, SDK's exist to allow you to do this work. Same thing with Blackberries, and anything running windows mobile (using .NET mobile).

You're not likely going to achieve this with purely PHP.

\\.\
08-11-2008, 04:13 AM
... Which is why these devices are "Java" enabled.

So you really need to be looking at the particular flava of JAva for your phone.