Avatar ·

Error Call to undefined function curl_init() in PHP: causes and solution

Hello everyone! I'm a beginner in PHP and trying to make a simple HTTP request to an external API via cURL. I wrote this code:\n\n```php\n\n```\n\nBut when running the script I get a fatal error: **Call to undefined function curl_init()**. I checked that PHP is installed, version 8.1. Please advise what to do? Do I need to enable something in php.ini? Or maybe this function was removed in newer PHP versions? Thanks in advance for your help!\n\nAdditionally: I'm working on Windows, using OpenServer. In phpinfo() I don't see the cURL section. I tried googling, but the advice varies — some say about installing libcurl, others about enabling extension.