NOTE: I should add that I'm not fishing for a cURL solution. I already know and do cURL. I want to see what happens in my experiment with an http function.
I'm running PHP 7 from a XAMPP installation at:
C:xampp\php
I downloaded a Windows pecl-5.2.6-Win32.zip, which was full of .dll files, then I copied the php_http.dll file into my php\ext folder, where all the other .dlls were found.
I edited my php.ini and added the line extension=php_http.dll
in the alphabetical order of all the other extensions (as if that makes any difference).
Then I restarted Apache, and tried to perform a $response = http_get($url);
but get the error "Call to undefined function http_get()".
Seems like I'm doing all the steps right, but the http functions just aren't working. Also, I looked at my phpinfo() and I don't see any reference to any PECL extension.
UPDATE: I read in another forum a similar problem, where this line was found in the Apache error.log:
C:\xampp\php\ext\php_http.dll' - The specified module could not be found.
The individual said he downgraded his php version, then repeated the steps and it worked.
Last night I downgraded from PHP 7 to PHP 5.6. I repeated the .dll copy to /ext, enabled php_http.dll in php.ini, and then got a different error:
HP Warning: PHP Startup: Unable to load dynamic library 'C:\xampp\php\ext\php_http.dll' - %1 is not a valid Win32 application.\r\n in Unknown on line 0
I found these Windows http extensions, again copied the .dll file, restarted Apache, but now I'm back to
PHP Warning: PHP Startup: Unable to load dynamic library 'C:\xampp\php\ext\php_http.dll' - The specified module could not be found.\r\n in Unknown on line 0