#1の場合、次のようなことができます...
電話アプリに次のような方法があります。
- (void) send_to_server {
NSString *urlString = [NSString stringWithFormat:@"http://weburl.com/?variable=%@", variable];
NSURLRequest *theRequest = [NSURLRequest requestWithURL:[NSURL URLWithString:urlString] cachePolicy:NSURLRequestUseProtocolCachePolicy timeoutInterval:60.0];
NSURLConnection *theConnection = [[NSURLConnection alloc] initWithRequest:theRequest delegate:self];
if (theConnection) {
receivedData = [NSMutableData data];
if ([[NSString stringWithFormat:@"%@", receivedData] isEqualToString:@"Success"]){
//Do something here
}else{
//Do something else here
}
}
}
PHPでは、次のようなことができます。
<?php
$variable = $_GET['variable'];
//do what you need to do here...
//Put things into queue or what-not
if ($success){
echo "Success";
}else{
echo "Failure";
}
?>
更新しました
<?php
if (isset($_GET['variable']){
echo "Success";
$variable = $_GET['variable'];
//do what you need to do here...
}else{
echo "Failure";
}
?>
他の電話にプッシュ通知を送信することに関しては、私はその部分を行う方法がわかりません。しかし、PHPには効率の問題はないと思います。