php中ASP.NET的WebRequest等效于什么?
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.
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.