简体   繁体   English

从URL到Perl FCGI脚本

[英]cUrl to perl FCGI script

I'm having to re-create existing code in php. 我必须在php中重新创建现有代码。

A perl script which implements FCGI::Request() is connected to via LWP::UserAgent->credentials() 通过LWP::UserAgent->credentials()将实现FCGI::Request()的perl脚本连接到

How would I connect to this script using cUrl (php) instead of LWP (perl)? 如何使用cUrl(php)而不是LWP(perl)连接到此脚本?
Or, What is a better/more suited method of connection to such from php? 或者,从php连接到这样的更好/更合适的方法是什么?

curl_setopt($ch, CURLOPT_USERPWD, urlencode($username) . ':' . urlencode($password));

Where $ch is $ch = curl_init(); 其中$ ch是$ch = curl_init(); Rest are self explanatory. 休息是不言自明的。

Also see: How do I make a request using HTTP basic authentication with PHP curl? 另请参见: 如何使用HTTP curl和PHP curl进行请求? and Client URL Library . 客户端URL库

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

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