As a result of the fast development in mobile networks and rapid growing of electronic technology, mobile devices can be used for various purposes. Nowadays these devices not only used for telephone communications but also we can use them for many Internet applications, e.g. mobile fund transfer, e-commerce, e-wallet and theater booking. These applications should use of strong encryption techniques for data security. Because mobile devices have low-computation capabilities and limited battery life, it is not suitable to use conventional asymmetric cryptographic techniques, with them. On the other hand, most of the data encryption technology is location-independent and cannot restrict the location of data decryption. In this paper, we try to apply position and time into the encryption and decryption processes so that provides an additional layer of security and present a modified geoencryption protocol that will allow mobile nodes to communicate to each other safely by restrict decoding a message in the specific location and time period. The recipient can decrypt messages if he stays in specific area and limited time. According to our experimental study, the approach can meet the confidentiality, authentication, simplicity, and practicability of security issues. Therefore, the proposed approach is effective and practical for data transmission to mobile users.