depler / curl-impersonate-win

A special build of curl for Windows that can impersonate Chrome and Safari
131 stars 33 forks source link

Configuring with WAMP #3

Closed codemonies closed 2 years ago

codemonies commented 2 years ago

Hi,

I am using the precompiled curl-impersonate-win files: https://github.com/depler/curl-impersonate-win/releases/tag/7.84.0

I moved libcurl.dll to my PHP ext folder: C:\wamp\bin\php\php7.1.9\ext

Then, I updated php.ini, uncommenting this:

;extension=php_curl.dll

And adding this:

extension=libcurl.dll

However, it gives me the following error:

Fatal error: Uncaught Error: Call to undefined function curl_init()

I also tried simply replacing php_curl.dll with libcurl.dll from the precompiled binaries, but it also gives the same error.

Any ideas on how I can use this with WAMP?

depler commented 2 years ago

I don't have experience with integrating curl library into PHP powered modules. However, you can try to get original curl library and check if everything works fine. If no (which is most likely) - than this is configuration problem and not related to curl itself.

codemonies commented 2 years ago

Yep, everything works fine with the original cURL library.

It looks like I would have to recompile PHP using curl-impersonate-win's libcurl.a

Not an easy task, so I'll just use shell_exec instead.