Add to Chrome
✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.
Millal eelistatakse cURL-i lihtsamale file_get_contents()-ile API päringute tegemisel?
file_get_contents()
Kui on vaja rohkem kontrolli, ehk nt muud HTTP meetodid (POST, PUT, DELETE), päised, ajapiirangud, veakäsitlus
file_get_contents() ei tööta URL-idega, ainult kohalike failidega
cURL on alati kiirem, seega tuleks seda eelistada igal juhul
Kui API tagastab JSON-i, mitte XML-i
Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!