Quote:
Originally Posted by Marv
Could someone help me with that problem ? I can run the gateway only once a day connecting to 9 newsgroups. That means I receive ~50 posts from the first newsgroup and while they are ported over to the db my Server-IP becomes blocked :ermm:
I guess the script works perfect as it should. I only must connect to a newsserver that seems to accept only 5 request per second. 5 connections to newsgroups are working fine - everything above becomes blocked. I guess that?s because the script doesn?t loop through each ng like the script imports the single posts. Instead it gateways all ng?s with only one request which means multiple connections at one time. (True or false ?)
Is there a way that gateway.php could pause between two ng?s for ? seconds ?
Regards,
Marv.
|
A quick and dirty way is to add:
sleep (5);
under this line:
while ($group = $DB_site->fetch_array($get_groups)){
Change 5 to other seconds you want. The script queries the server one by one, it does not create more than one connection at a time. It behaves quite like a normal news reader.