Difference between revisions of "Troubleshooting of curl errors"

From LemonWiki共筆
Jump to navigation Jump to search
(Created page with "[https://curl.haxx.se/ curl] "is used in command lines or scripts to transfer data."[https://curl.haxx.se/] == How to resolve cUrl error (#5): Unsupported proxy syntax == Con...")
(No difference)

Revision as of 17:30, 20 May 2020

curl "is used in command lines or scripts to transfer data."[1]

How to resolve cUrl error (#5): Unsupported proxy syntax

Condition: the username of socks5 proxy contains @ symbol such as [email protected]

curl_setopt($ch, CURLOPT_PROXY, 'socks5://username:[email protected]:12345');
// result is ok

curl_setopt($ch, CURLOPT_PROXY, 'socks5://[email protected]:[email protected]:12345');
// met cUrl error (#5): Unsupported proxy syntax

Solution: Escape the special symbol[1] using URL Encode and Decode - Online or urlencode function

curl_setopt($ch, CURLOPT_PROXY, 'socks5://bob%40email.com:[email protected]:12345');
// result is ok


References


Troubleshooting of ...

Template