inherit
100824
0
May 13, 2012 5:37:49 GMT -8
Michael
14,585
March 2007
wrighty
|
Post by Michael on Dec 30, 2009 13:12:12 GMT -8
What's the difference & when's it best to use one over another?
|
|
inherit
130228
0
Jul 11, 2024 19:19:59 GMT -8
Charles Stover
1,731
August 2008
gamechief
|
Post by Charles Stover on Dec 30, 2009 22:02:48 GMT -8
Depends. file_get_contents is faster (I think) and doesn't require the cURL library (a lot of free servers have cURL disabled). However, cURL allows POST data, custom headers, custom everything, etc. cURL is practically the tools behind the browser, allowing you to modify anything and everything a browser can alter. file_get_contents is just the address bar.
|
|
inherit
100824
0
May 13, 2012 5:37:49 GMT -8
Michael
14,585
March 2007
wrighty
|
Post by Michael on Dec 31, 2009 8:30:59 GMT -8
Can't file_get_contents be blocked also? So that it won't work? Can cURL be blocked?
|
|
inherit
130228
0
Jul 11, 2024 19:19:59 GMT -8
Charles Stover
1,731
August 2008
gamechief
|
Post by Charles Stover on Dec 31, 2009 13:06:08 GMT -8
file_get_contents isn't generally blocked. cURL is often blocked on free servers, but not always. I imagine file_get_contents would be blocked from external URLs if safe mode is enabled, but I don't recall a way to disable it other than that. cURL has its own series of functions that can all be disabled at once, by simply not including their library. Unless you're asking if it can be blocked by the website to which you're attempting to connect, in which case the answer is no, because the website won't know you're using cURL or file_get_contents.
|
|