English 中文(简体)
PHP:我如何利用XML和图像提供网络服务?
原标题:PHP: How can I make a webservice that respondes with XML and an image?

我的购买力平价能力几乎不存在,我正在努力使教育、科学和技术部的网络服务非常简单。 该处目前查询一个数据库,并在申请/用户群的答复中反映图像。 我通过ASIHTTP(一个REST-03框架)呼吁提供这一网络服务,该网络正在恢复图像的精干:

Is there any way to make the PHP service return an image AND an XML file? I am thinking the only way to do this is to write the image byte array directly into the XML file. If so - how do I do this with PHP?

谢谢。

问题回答

如果ASIHTTP支持这一点,你可以尝试将图像数据纳入XML,但你必须首先阅读有关文件。 你只能把双元数据放在XML档案中,首先需要将其转换成像第64号基数。

海事组织的更好(更有力)办法是独立地发送这两个档案:要求XML,其中可能包含一个身份证或一个图像,然后又要求获得图像。

除了更强有力的法典外,在图像完全装满之前,你还将能够整整部XML。 视图像通常比XML信息要大得多,差异将是无法理解的。

我认为,唯一的办法是把64个图像数据与PHP编码,并将其编码在你的桌面上。 见。 手册页——第一篇评论描述了如何用它读写形象。





相关问题
Brute-force/DoS prevention in PHP [closed]

I am trying to write a script to prevent brute-force login attempts in a website I m building. The logic goes something like this: User sends login information. Check if username and password is ...

please can anyone check this while loop and if condition

<?php $con=mysql_connect("localhost","mts","mts"); if(!con) { die( unable to connect . mysql_error()); } mysql_select_db("mts",$con); /* date_default_timezone_set ("Asia/Calcutta"); $date = ...

定值美元

如何确认来自正确来源的数字。

Generating a drop down list of timezones with PHP

Most sites need some way to show the dates on the site in the users preferred timezone. Below are two lists that I found and then one method using the built in PHP DateTime class in PHP 5. I need ...

Text as watermarking in PHP

I want to create text as a watermark for an image. the water mark should have the following properties front: Impact color: white opacity: 31% Font style: regular, bold Bevel and Emboss size: 30 ...

How does php cast boolean variables?

How does php cast boolean variables? I was trying to save a boolean value to an array: $result["Users"]["is_login"] = true; but when I use debug the is_login value is blank. and when I do ...

热门标签