curl: running exec() vs. curl_init()

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
jonwondering
Forum Commoner
Posts: 39
Joined: Mon Mar 13, 2006 6:26 pm

curl: running exec() vs. curl_init()

Post by jonwondering »

Hi, I am writing code to communicate with REST API and I was wondering what are advantages/disadvantages to using exec("curl ...") vs. using the commands that are built into php: curl_init(), curl_exec(). Which is faster? Are there any problems that might occur with running curl through exec()? Any help/links/reading are appreciated! Thanks.
Post Reply