简体   繁体   中英

cUrl to perl FCGI script

I'm having to re-create existing code in php.

A perl script which implements FCGI::Request() is connected to via LWP::UserAgent->credentials()

How would I connect to this script using cUrl (php) instead of LWP (perl)?
Or, What is a better/more suited method of connection to such from php?

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

Where $ch is $ch = curl_init(); Rest are self explanatory.

Also see: How do I make a request using HTTP basic authentication with PHP curl? and Client URL Library .

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