Jump to content

PHP to load more than one URL at once?


devWhiz

Recommended Posts

<?php

$URL1 = file_get_contents('http://www.yahoo.com');
$URL2 = file_get_contents('http://www.google.com');
?>

 

How would I make PHP load URL1 and URL2 at the same time..

 

I would add more than 2 urls also, Im tyring to test something with my website, load up to 50 links at once, how would I do this?

 

Thanks

Link to comment
https://forums.phpfreaks.com/topic/229094-php-to-load-more-than-one-url-at-once/
Share on other sites

You can not run things asynchronously with PHP (which is what you're asking to do). You might be able to do it with JavaScript and AJAX, but I believe there is a limit to the number of asynchronous threads you can start with AJAX and that limit is much less than 50. Why do you want to do this?

 

Ken

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.