You are here: Re: Processing Arrays « All PHP « IT news, forums, messages
Re: Processing Arrays

Posted by Anthony Fojas on 10/11/47 11:53

I'm not sure I follow what you're trying to do. I think you're saying
you want to go to 'http://www.somedomain.nl/process.php?url=' and
concatenate the lines fo your text file to that url.

some thing like,

foreach($lines as $line) {
file("http://www.somedomain.nl/process.php?url=".$line)
}

I think...
-Anthony

Samuël van Laere wrote:
> Currently I use a script that needs a lot of work to maintain,
> I call it like this:
> http://www.somedomain.nl/process.php?url=http://www.somedomain.nl/page/1/
> and would need to replace the url by hand to process another page.
>
> I'm just wondering how to automate this process.
> So i've written a full list of a url's that need to be processed
> and have written it to a file:
> links.txt
>
> Next I put the contents of this file into an array ($lines):
>
> $filename="links.txt";
> $lines = array();
> $file = fopen($filename, "r");
> while(!feof($file)) {
>
> //read file line by line into a new array element
> $lines[] = fgets($file, 4096);
>
> }
> fclose ($file);
>
> But how can I walk each item in the array with GET (or POST)?
> Basicly the script would need to process the first item, before
> starting with the next in line.
>
> Any thoughts?
>
> Cheers,
> Sam

 

Navigation:

[Reply to this 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

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