开发者

What is the equivalent of ASP.NET's WebRequest in php?

开发者 https://www.devze.com 2022-12-15 20:12 出处:网络
What is the equivalent of ASP.NET\'s WebReq开发者_JAVA百科uest in php?I think that would be fopen, which can retrieve data from files or remote URLs.

What is the equivalent of ASP.NET's WebReq开发者_JAVA百科uest in php?


I think that would be fopen, which can retrieve data from files or remote URLs.

You could also look into using curl if you're interested in retrieving remote resources.


You can to use curl.

Some samples here: Make Yahoo! Web Service REST Calls with PHP


Just to add that the file() function can work with URLs too:

http://www.php.net/manual/en/function.file.php

A URL can be used as a filename with this function if the fopen wrappers have been enabled.

HTTP, HTTPS are both soported but using these functions you're generating only GET request.

I'd also go curl for the whole package.

0

精彩评论

暂无评论...
验证码 换一张
取 消