简体   繁体   English

如何将移动联系与PHP和MySQL同步

[英]How to synchronize mobile contact with PHP and MySQL

How can a user synchronize his own mobile numbers database using GPRS or 3G mobile browser. 用户如何使用GPRS或3G移动浏览器同步自己的手机号码数据库。 synchronize contacts will be stored in a MySQL table in my server. 同步联系人将存储在我的服务器的MySQL表中。

Example: a user will type www.example.com from his mobile phone browser and clicks on " synchronize now " button, then automatically his phone's contacts will be synchronize in our server and new contacts will be stored in a MySQL table. 示例:用户将从他的手机浏览器中键入www.example.com并单击“立即同步 ”按钮,然后他的手机联系人将自动在我们的服务器中同步,新的联系人将存储在MySQL表中。

I have searched in google but not yet got any specific result. 我在谷歌搜索但尚未得到任何具体结果。

I am not sure if you can do this via the mobile browser. 我不确定你是否可以通过移动浏览器这样做。 However like the comment from Ajay states you would be able to do this via J2ME(Java devices), Android and iPhone by actually programming a small interface. 然而,就像Ajay的评论一样,你可以通过J2ME(Java设备),Android和iPhone实际编程一个小接口来做到这一点。

You would need to create some sort of web service hosted on www.example.com. 您需要创建托管在www.example.com上的某种Web服务。 This web service will take a XML message and insert it into the MySQL database. 此Web服务将获取XML消息并将其插入MySQL数据库。 Essentially your application would be run by a user they would press a upload button and this would read the contacts database convert it to a SOAP/XML message and post the message to the webservice. 基本上,您的应用程序将由用户运行,他们将按下上传按钮,这将读取联系人数据库将其转换为SOAP / XML消息并将消息发布到Web服务。

I suspect the reason you wont be able to do this straight from a browser would be the fact that if a browser got hijacked/hacked/infected with malware/virus it could upload your address book without your authorization. 我怀疑你无法直接从浏览器中执行此操作的原因是,如果浏览器被劫持/黑客攻击/感染了恶意软件/病毒,它可能会在未经您授权的情况下上传您的地址簿。 Most mobiles are strict with the access to the contacts and other phone functions and it is highly unlikely that you would be able to get around this. 大多数手机都严格访问联系人和其他手机功能,你很可能无法解决这个问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM