In trying to get the text off a particular website, I've used two different ways, both of which seem to work fine & give the exact same results..
I was wondering if anyone could give me any insight or recommendations why one way might be any better or worse than the other .
I've used these two ways:
$ch1=curl_init();
curl_setopt($ch1,CURLOPT_URL,$link1);
curl_setopt($ch1,CURLOPT_RETURNTRANSFER, true);
$text1=curl_exec($ch1);
// or
$text1 = shell_exec('curl '.$link1 );
The second way seems easier & speedwise they both are about the same
I've also tried "file_get_contents" which also gives the same results but is obviously slower.