Michdd Posted July 16, 2009 Share Posted July 16, 2009 Say you're just wanted to get the output a of an external site, what would be the advantages of using cURL over just doing file_get_contents('site url'); ? Link to comment https://forums.phpfreaks.com/topic/166163-why-curl/ Share on other sites More sharing options...
Ken2k7 Posted July 16, 2009 Share Posted July 16, 2009 Does file_get_contents work outside of the same server? With cURL, you can send cookie data over, POST and or GET values, etc. =) Link to comment https://forums.phpfreaks.com/topic/166163-why-curl/#findComment-876271 Share on other sites More sharing options...
Michdd Posted July 16, 2009 Author Share Posted July 16, 2009 Yes, file_get_contents() does work outside of the server. And I know that with cURL you can send POST and GET values, but if you're not requiring any of that would be acceptable to use file_get_contents()? I just started studying the paypal API, and most examples use cURL, but since they're just querying a simple url with parameters and getting back the response it seems that it could be done simply with file_get_contents(). Link to comment https://forums.phpfreaks.com/topic/166163-why-curl/#findComment-876283 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.