简体   繁体   English

从远程服务器安全地读取xml数据

[英]Reading xml data from remote server securely

I need to get some xml data from my customer's server. 我需要从客户服务器获取一些xml数据。 I created two php files for doing this. 为此,我创建了两个php文件。 When I call a php file in my server (reader.php), it calls the file in remote server (client.php) and gets data via curl. 当我在服务器(reader.php)中调用一个php文件时,它将在远程服务器(client.php)中调用该文件并通过curl获取数据。 Of course, everyone can access this client.php file, so I created some validations for security. 当然,每个人都可以访问此client.php文件,因此我创建了一些安全性验证。 The reader.php calls client.php with some special parameters (send with POST) and client.php checks these parameters, if everyting is fine, prints the xml data for reading. reader.php使用一些特殊参数(随POST发送)调用client.php,client.php检查这些参数,如果一切正常,则输出xml数据以供读取。

I wonder this approach is enough for security? 我想知道这种方法是否足以保证安全性? This XML data is really important and I don't want to do something wrong. 这些XML数据非常重要,我不想做错任何事情。

First of all, you MUST use SSL for secure transmission of information. 首先,您必须使用SSL进行信息的安全传输。

Second of all, what are these "special parameters" you refer to? 第二,您指的是这些“特殊参数”? If you are talking about a username/hashed password, then in conjunction with SSL encryption you are doing what 95% of websites do for security. 如果您谈论的是用户名/哈希密码,那么结合SSL加密,您将执行95%的网站安全性操作。 Of course, you can always get more extreme. 当然,您总是可以变得更加极端。

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

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