Reply to Re: Lopping through a URL

Your name:

Reply:


Posted by ZeldorBlat on 03/10/06 16:44

Maximus wrote:
> i have a loop running through an array of numbers, I want that loop to
> connect to a url each time it passes a numbe.
>
> example:
>
> the array has numbers: 1 , 2 , 3
>
> i want the loop to connect to the url as follows:
>
> http://xxx.com/test.asp?id=1
>
> http://xxx.com/test.asp?id=2
>
> http://xxx.com/test.asp?id=3
>
>
> any solution?

What do you mean by "connect" ? Fetch the page?

$a = array(1, 2, 3);
foreach($a as $v) {
$url = 'http://xxx.com/test.asp?id=' . $v;
$str = file_get_contents($url);
//do something with $str
}

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация