/    Sign up×
Community /Pin to ProfileBookmark

List All Page fetching Functions

Php Experts,

When I say “simple php” I mean php’s old functions or ‘page fetching’ functions that are not php cURL.

Q1.
Do you mind listing all the page fetching functions in php that you know along with their shortcomings ?
I only came across these 2 when checking out Web Crawler tutorial php codes.
file_get_content();
file_get_html();
That way, I can checkout each and everyone’s strengths and limitations.

Q2.
file_get_content();
file_get_html();
I read the 1st function sometimes fail to fetch pages. If that’s true then, why is that ?
And is the 2nd one any better ?

I read it is best to use the cURL instead. Can you confirm this ? Don’t forget to answer.

Anyway, most tutorials online that teach you how to build a web crawler are not on php cURL but simply php using those 2 functions or the ‘simple_html_dom.php’ .

Q3.
I was looking into php cURL before coming across the ”simple_html_dom.php’.
I realise with cURL you have to write way more code than simple php just to fetch webpages remotely from other servers. Can you confirm this is true ?

Q4.
Modern tutorials promote the ‘simple_html_dom.php’. Can you confirm Php cURL does not use it but only simple php uses it ? And if only simple php uses it then should I stick to simple php and the ‘simple_html_dom.php’ or should I revert back to php’s cURL ? Remember, I need to build a web crawler that is capable of fetching all external server pages. Can’t afford misfires like the file_get_content() function.

to post a comment
PHP

0Be the first to comment 😎

×

Success!

Help @developer_web spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.14,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...