PHP Developers Network

A community of PHP developers offering assistance, advice, discussion, and friendship.
 
Loading
It is currently Fri Jun 05, 2020 12:37 am

All times are UTC - 5 hours




Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: Fri May 06, 2016 7:52 am 
Offline
Forum Newbie

Joined: Fri May 06, 2016 7:42 am
Posts: 1
Hi

When i use the file_get_contents function to retrive data from multiple url by using while loop, the codei works fine but it loads very slow. Can any one know what is the problem on my php code?


Top
 Profile  
 
PostPosted: Fri May 06, 2016 8:26 am 
Offline
Moderator
User avatar

Joined: Tue Nov 09, 2010 3:39 pm
Posts: 6425
Location: Montreal, Canada
It's a blocking request, so it's bound to be slow. Consider looking at curl_multi or Guzzle for asynchronous requests.

_________________


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: Google [Bot] and 11 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group