简体   繁体   中英

Can we use PHP classes in Asp.net

I have got some library files in PHP. i want to use them in asp.net. please give me some idea that how to use it or how to convert it to be used in asp.net (vb.net). actually i want to connect with a xml based web service (HostelsClub) but they just have API in PHP not in asp.net. so what to do.

If it's an XML service, especially if it is a 3rd party service, and is performing fine in PHP, why not simply call the service from .net using XML-RPC or similar? I'm not sure from your question that you actually need to be re-writing the PHP service.

XML services should be consumable from any language providing the XML call structures are known.

Although their API is written in PHP that should be irrelevant unless it is a code-dependent API. Reading between the lines of your query ("want to connect to...") it's not clear whether this is a local library that you need to connect to from PHP to PHP, or whether you simply need to call/connect to a web based service that has been built on-top of the library that you mention. If it's a web-based service then all major protocols are certainly possible in .net, php, ruby, perl, etc.

That's the way how it works with c#

Tomasp.net

I'm not sure about vb.net but it's .net at all.

最好的选择是学习一种以上的语言,这样您就不会完全依赖任何特定的供应商。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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