search

Home  >  Q&A  >  body text

How to PHP simulate curl transfer under cmd to download files

Recently I found a GAN algorithm on github to turn old photos into color, so I put it on the server and tried it. I wanted to call the api through php to download the converted pictures, but I found many tutorials on the Internet and couldn't succeed.

The following is achieved through cmd:

curl -X POST "http://suoran.ddns.net:5000/process"

-H "accept: image/png" -H "Content-Type: application/json"

-d "{\"url\":\"http://www.afrikanheritage.com/wp-content/uploads/2015 /08/slave-family-P.jpeg\", \"render_factor\":35}"

--output colorized_image.png

Someone can Solve it

SuoSuo1286 days ago1015

reply all(0)I'll reply

No reply
  • Cancelreply