Вопрос : перемеююый нося проблемы через петлю

Hi, Кодий
The позволяет потребителю input имена города отделенные запятым в первых коробке и после этого ключевых словах отделенных запятыми в второй коробке: результат

The первоначально производит список

if, котор
urls например вы вписываете

it
and
attorney
Portland (в верхней коробке) (в нижней коробке) производите следующий список urls можно увидеть если uncommented следующий часть начиная он-лайн 35:, тоВЗГЛЯД

//TO СОЗДАЛ URLS UNCOMMENT THIS
//foreach ($urls как => $value) {отголосок $value $key
//. «
»;
//exit
//} ();

here будет rel= " nofollow "» _blank»» target= " http://www.google.com/search?q=portland+attorney+&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-US:official href= produced
ch http://www.google.com/sear? q=portland+attorney+&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:En-США: rel= " nofollow "» _blank»» target= " http://www.google.com/search?q=attorney+portland+&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-US:official href=
fficial " > ch http://www.google.com/sear? q=attorney+portland+&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:En-США: official "

(примечания что сценарий производит вариант для «

If Portland юриста» юриста» Portland «и) я был к enter
Portland,
attorney Spokane (верхнего коробки),
the законоведа (нижнего коробки) следующий, котор urls были бы произведены: rel= " nofollow "» _blank»» target= " http://www.google.com/search?q=Portland+attorney+&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-US:official href=

ch http://www.google.com/sear? q=Portland+attorney+&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:En-США: rel= " nofollow "» _blank»» target= " http://www.google.com/search?q=attorney+Portland+&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-US:official href=
fficial " > ch http://www.google.com/sear? q=attorney+Portland+&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:En-США: rel= " nofollow "» _blank»» target= " http://www.google.com/search?q=Portland++lawyer+&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-US:official href=
fficial " > ch http://www.google.com/sear? q=Portland++lawyer+&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:En-США: rel= " nofollow "» _blank»» target= " http://www.google.com/search?q=+lawyer+Portland+&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-US:official href=
ficial " > ch http://www.google.com/sear? q=+lawyer+Portland+&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:En-США: rel= " nofollow "» _blank»» target= " http://www.google.com/search?q=+Spokane+attorney+&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-US:official href=
ficial " > ch http://www.google.com/sear? q=+Spokane+attorney+&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:En-США: rel= " nofollow "» _blank»» target= " http://www.google.com/search?q=attorney++Spokane+&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-US:official href=
fficial " > ch http://www.google.com/sear? q=attorney++Spokane+&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:En-США: rel= " nofollow "» _blank»» target= " http://www.google.com/search?q=+Spokane++lawyer+&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-US:official href=
fficial " > ch http://www.google.com/sear? q=+Spokane++lawyer+&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:En-США: rel= " nofollow "» _blank»» target= " http://www.google.com/search?q=+lawyer++Spokane+&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-US:official href=
ficial " > ch http://www.google.com/sear? q=+lawyer++Spokane+&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:En-США:

Now

official " (примечания что сценарий как раз принимает каждую комбинацию и создает url) вторая часть сценария предполагаемо выскоблить специфически части данных от приводя к url.  Так я положу комментарии назад к разделу начиная на линии 35 я упомянул над…

and если сценарий

the
attorney enter
Portland I (в верхней коробке) (в нижней коробке) производит правильно rel= " nofollow "» _blank»» target= " http://www.stahancyk.com href= www.portlandattorneyatlaw.org " nofollow "» rel=» _blank» target= " http://www.portlandattorneyatlaw.org href= 1 домена

Position выхода (фактическ в форме таблицы) (503) 308-1291
2 > rel= " nofollow "» _blank»» target= " http://www.gevurtzmenashe.com href=
(503) 222-9115
3 > www.gevurtzmenashe.com
, то (503) rel= " nofollow "» _blank»» target= " http://www.yourinjurylawyers.com href= 4 > rel= " nofollow "» _blank»» target= " http://www.goldbergjones-wa.com href= (503) 224-1106
5 > rel= " nofollow "» _blank»» target= " http://www.baxterlaw.com href=
(503) 731-8888
6 > rel= " nofollow "» _blank»» target= " http://www.stahancyk.com href=
www.portlandattorneyatlaw.org " nofollow "» rel=» _blank» target= " http://www.portlandattorneyatlaw.org href= www.portlandlegalservices.com " nofollow "» rel=» _blank» target= " http://www.portlandlegalservices.com href= (503) 297-9031
7 (503) 222-7401
1 (503) 308-1291
2 > www.stahancyk.comrel= " nofollow "» _blank»» target= " http://www.gevurtzmenashe.com href=
(503) 222-9115
3 > rel= " nofollow "» _blank»» target= " http://www.yourinjurylawyers.com href=
(503) 227-1515
4 > rel= " nofollow "» _blank»» target= " http://www.goldbergjones-wa.com href=
(503) 224-1106
5 > rel= " nofollow "» _blank»» target= " http://www.baxterlaw.com href=
(503) 731-8888
6 > rel= " nofollow " >www.portlandlegalservices.com
» _blank»» target= " http://www.portlandlegalservices.com href= (503) 297-9031
7 (503) 222-7401

It принимало каждый url (вспомните были 2 я произведено для варианта когда только одно input в каждой коробке) и выскобленные данные от приводя к page.

If я вошли,

Portland,
attorney Spokane (верхней коробки), результат

The законоведа (нижней коробки) который следующим образом: rel= " nofollow "» _blank»» target= " http://www.laymanlawfirm.com href=
1 домена

Position > rel= " nofollow "» _blank»» target= " http://www.maxeylaw.com href=
(509) 455-8883
2 > rel= " nofollow "» _blank»» target= " http://www.lukins.com href=
(509) 458-0183
3 > rel= " nofollow "» _blank»» target= " http://www.denniscronin.com href=
(509) 455-9555
4 thegaiahouse.com (509) 327-2560
5 > rel= " nofollow "» _blank»» target= " http://www.wkdtlaw.com href=
(509) 328-5600
6 ewinganderson.com (509) 838-4261
7 > www.wkdtlaw.com
(509) rel= " nofollow "» _blank»» target= " http://www.laymanlawfirm.com href= 1 > rel= " nofollow "» _blank»» target= " http://www.maxeylaw.com href= (509) 455-8883
2 > rel= " nofollow "» _blank»» target= " http://www.lukins.com href=
(509) 458-0183
3 > rel= " nofollow "» _blank»» target= " http://www.denniscronin.com href=
(509) 455-9555
4 thegaiahouse.com (509) 327-2560
5 > rel= " nofollow "» _blank»» target= " http://www.wkdtlaw.com href=
(509) 328-5600
6 ewinganderson.com (509) 838-4261
7 > www.wkdtlaw.com
(509) 624-5265
1      nofollow "» rel=» _blank "» target= " http://www.wkdtlaw.com href= " nofollow "» rel=» _blank» target= " http://www.denniscronin.com href= " nofollow "» rel=» _blank» target= " http://www.lukins.com href= " nofollow "» rel=» _blank» target= " http://www.maxeylaw.com href= " nofollow "» rel=» _blank» target= " http://www.laymanlawfirm.com href= (509) 455-8883
2 > (509) 458-0183
3 > (509) 455-9555
4 thegaiahouse.com (509) 327-2560
5 > (509) 328-5600
6 ewinganderson.com (509) 838-4261
7 > href=
(509) 624-5265
1 "rel= " nofollow "» _blank»» target= http://www.laymanlawfirm.com > rel= " nofollow "» _blank»» target= " http://www.maxeylaw.com href=
(509) 455-8883
2 > rel= " nofollow "» _blank»» target= " http://www.lukins.com href=
(509) 458-0183
3 > rel= " nofollow "» _blank»» target= " http://www.denniscronin.com href=
(509) 455-9555
4 thegaiahouse.com (509) 327-2560
5 > rel= " nofollow "» _blank»» target= " http://www.wkdtlaw.com href=
(509) 328-5600
6 ewinganderson.com (509) 838-4261
7 > target= " http://www.laymanlawfirm.com» href=
(509) 624-5265
1rel= " nofollow "» _blank» > rel= " nofollow "» _blank»» target= " http://www.maxeylaw.com href=
(509) 455-8883
2 > rel= " nofollow "» _blank»» target= " http://www.lukins.com href=
(509) 458-0183
3 > rel= " nofollow "» _blank»» target= " http://www.denniscronin.com href=
(509) 455-9555
4 thegaiahouse.com (509) 327-2560
5 > rel= " nofollow "» _blank»» target= " http://www.wkdtlaw.com href=
(509) 328-5600
6 ewinganderson.com (509) 838-4261
7 > target=» _blank» " http://www.laymanlawfirm.com» href=
(509) 624-5265
1 nofollow» rel= "» _blank» target= " http://www.laymanlawfirm.com href=
" nofollow "» rel=» _blank» target= " http://www.wkdtlaw.com href= " nofollow "» rel=» _blank» target= " http://www.denniscronin.com href= " nofollow "» rel=» _blank» target= " http://www.lukins.com href= " nofollow "» rel=» _blank» target= " http://www.maxeylaw.com href= " nofollow " rel= > (509) 455-8883
2 > (509) 458-0183
3 > (509) 455-9555
4 thegaiahouse.com (509) 327-2560
5 > (509) 328-5600
6 ewinganderson.com (509) 838-4261
7 > (509) 624-5265
1" > rel= " nofollow "» _blank»» target= " http://www.maxeylaw.com href=
(509) 455-8883
2 > rel= " nofollow "» _blank»» target= " http://www.lukins.com href=
(509) 458-0183
3 > rel= " nofollow "» _blank»» target= " http://www.denniscronin.com href=
(509) 455-9555
4 thegaiahouse.com (509) 327-2560
5 > rel= " nofollow "» _blank»» target= " http://www.wkdtlaw.com href=
(509) 328-5600
6 ewinganderson.com (509) 838-4261
7 > rel= " nofollow "» _blank»» target= " http://www.laymanlawfirm.com href=
(509) 624-5265
1 > www.laymanlawfirm.comrel= " nofollow "» _blank»» target= " http://www.maxeylaw.com href=
(509) 455-8883
2 > rel= " nofollow "» _blank»» target= " http://www.lukins.com href=
(509) 458-0183
3 > rel= " nofollow "» _blank»» target= " http://www.denniscronin.com href=
(509) 455-9555
4 thegaiahouse.com (509) 327-2560
5 > rel= " nofollow "» _blank»» target= " http://www.wkdtlaw.com href=
(509) 328-5600
6 ewinganderson.com (509) 838-4261
7 > результат www.wkdtlaw.com
(509) 624-5265

This только частично правильно. Результаты на рядки 1-14 (1 до 7 и снова 1-7) вводить поправку на Spokane и законовед но с другой стороны он как раз повторяет такую же вещь для следующий (42) rows.

What должен случиться является следующим:

1-7 должно быть результаты для «
8-14 юриста Portland " должно быть результаты для «юрист, котор
15-21 Portland " должен быть результатами для «
22-28 законоведа Portland " должен быть результатами для «законовед
29-35 Portland " должен быть результатами для «
36-42 юриста Spokane " должен быть результатами для «юрист
43-49 Spokane " должен быть результатами для «
50-56 законоведа Spokane " должен быть результатами для «

Can Spokane законоведа " кто-то угождает взглянет на сценарии начиная он-лайн 48 и попытке для того чтобы помогать мне понять мне нужно изменить для того чтобы позволить правильный выход результаты? Я должен мочь input несколько значений отделенных запятым в верхней коробке и нижней коробке для того чтобы произвести длинний список records.

Thanks очень much.

class= " ясное " >
> " codeSnippet " class=
class= " lineNumbers "
class=
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
90:
91:
92:
93:
94:
95:
96:
97:
98:
99:
100:
101:
102:
103:
104:
105:
106:
107:
108:
109:
110:
111:
112:
113:
114:
115:
116:
117:
118:
119:
120:
121:
122:
123:
124:
125:
126:
127:
128:
129:
130:
131:
132:
133:
134:
135:
>< " class= " id= " codeSnippet939101
 $v $k) {
        $urlelements = взрывают ('', $v);
        $url = 'http://www.google.com/search?q=';
        foreach ($urlelements как $k2 => $v2) {
            $url. = $v2. «+»;
        }
        $url. = «&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla: En-США: должностное лицо "»;
        $urls [] = $url;
    }
    ВЗГЛЯД //TO СОЗДАЛ URLS UNCOMMENT ЭТО
    //foreach ($urls как => $value $key) {
    отголосок $value //. «
»; //} //exit (); отголосок «
 \ n»; // УЛУЧШАЕТ СЧИТЫВАЕМОСТЬ
    //

    вторьте «»;
    вторьте «»;

    вторьте «»;
    вторьте «»;
    foreach ($urls как $u) {
        $ch = curl_init ();
        curl_setopt ($ch, CURLOPT_URL, $url);
        curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
        curl_setopt ($ch, CURLOPT_FOLLOWLOCATION, 1);
        $file=curl_exec ($ch) или умирают (curl_error ());
        curl_close ($ch);
        // СОЗДАЕТ БЛОК ОТ HTML-----------------------------1. Домен
        $arr = взрывают («», $file);
        СБРАСЫВАНИЕ // ИЗЛИШНЕЕ ВЕЩЕСТВО ВВЕРХУ HTML
        unset ($arr [0]);
        ПОДНИМАЮЩЕЕ ВВЕРХ // АККУРАТНОЕ КАЖДЫЙ ЭЛЕМЕНТ БЛОКА
        foreach ($arr как => $string $ptr)
        {
        // ОБНАРУЖИВАЕТ МЕСТОНАХОЖДЕНИЕ КОНЕЦ ПОЛЕЗНЫХ ДАННЫХ
            $poz = strpos ($string, «  - ");
        КОНЕЦ // ЫХ ДАННЫХ - ПРЫГНИТЕ ЭТОТ ЭЛЕМЕНТ
            если (=== $poz ЛОЖНОЕ), то
            {
                unset ($arr [$ptr]);
                продолжайтесь;
            }
        // ИЗВЛЕКАЕТ НИКУДЫШНЫЕ ОТСТАВАЯ ДАННЫЕ И РЕМОНТИРУЕТ РЕАЛЬНОСТИ HTML (XML)
            $arr [$ptr] = substr ($string, 0, $poz);
            $arr [$ptr] = str_replace («& », «&», $arr [$ptr]);
        }

        // СОЗДАЕТ БЛОК ОТ HTML-----------------------------2. Телефонный номер
        $arr2 = взрывают («  - », $file);
        СБРАСЫВАНИЕ // ИЗЛИШНЕЕ ВЕЩЕСТВО ВВЕРХУ HTML
        unset ($arr2 [0]);
        ПОДНИМАЮЩЕЕ ВВЕРХ // АККУРАТНОЕ КАЖДЫЙ ЭЛЕМЕНТ БЛОКА
        foreach ($arr2 как => $string2 $ptr)
        {
        // ОБНАРУЖИВАЕТ МЕСТОНАХОЖДЕНИЕ КОНЕЦ ПОЛЕЗНЫХ ДАННЫХ
            $poz = strpos ($string2, «  - href class=fl »;
}
}
отголосок «
PositionDomainPhone
»; отголосок $i; отголосок «»; отголосок $arr [$i]; отголосок «»; отголосок $arr2 [$i]; отголосок «
»; } еще { «action='" id= "; отголосок «»; отголосок «»; вторьте «value= ''/>» name='input1 id= '' type='text »; вторьте «value= ''/>» name='input2 id= '' type='text »; вторьте «id= '' value='submit/> type='submit
»; вторьте «
»; вторьте «
  •  Как я добавляю кнопки на форме PDF для того чтобы добавить/извлекаю рядки данных?
  •  Шнур ошибки в блоке задвижки?
  •  сколько вариант сервера SQL на одной машине
  •  Внешний вид 2007 не может архивный файл открытой сети сохраненный
  •  Активно директория DNS записывает вопрос
  •  Отчет о доступа 2010 экспорта к CSV с коллекторами?
  •  Прокладчик OCE 9400 не начинает
  •  как добавить десятичное место в формуле в отчете о кристалла seagate
  •  Windows XP и Мичрософт Оутлоок и проблемы установителя Windows
  •  VB6 к VS2010 - консультации тренировки?
  •  
    programming4us programming4us