473,503 Members | 7,578 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

ASP help

hi there to all......

Is it possible to fetch data records from other website and store in a
database dynamically....
I mean to say i want to fetch data from a yellow pages website .......
showing records of different companies.
i.e, http://www.website.com/data.aspx?Com...&DirectoryID=2
So, now I want a script which goes on this path and copy data after
that go on next page which is CompanyID=3&DirectoryID=2 and follow the
procedure.........
thats it
I shall be very thankful to everyone who can do or help me to do....
thanks.

Jun 18 '06 #1
16 1730
Rizwan wrote:
hi there to all......

Is it possible to fetch data records from other website and store in a
database dynamically....
I mean to say i want to fetch data from a yellow pages website .......
showing records of different companies.
i.e, http://www.website.com/data.aspx?Com...&DirectoryID=2
So, now I want a script which goes on this path and copy data after
that go on next page which is CompanyID=3&DirectoryID=2 and follow the
procedure.........

http://www.aspfaq.com/show.asp?id=2173
--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
Jun 18 '06 #2
sashi
1,754 Recognized Expert Top Contributor
Hi Rizwan,

well.. to do that u need to consider few options.. such as..

1.) atleast read access to the database on that abc website
2.) the table n field structure of that database

if you have all these details handy then it possible otherwise it's not just impossible but it's next to impossible.. good luck my fren..
Jun 18 '06 #3
great question. I went to the link provided above, but have this question.

expanding on that, is there any way to break down the actual records instead
of showing everything that is in the HTML?

or is this a stupid question since everything on the client side IS just
html?
i think i answered my own question didn't i


"Rizwan" <ri*********@gmail.com> wrote in message
news:11**********************@i40g2000cwc.googlegr oups.com...
hi there to all......

Is it possible to fetch data records from other website and store in a
database dynamically....
I mean to say i want to fetch data from a yellow pages website .......
showing records of different companies.
i.e, http://www.website.com/data.aspx?Com...&DirectoryID=2
So, now I want a script which goes on this path and copy data after
that go on next page which is CompanyID=3&DirectoryID=2 and follow the
procedure.........
thats it
I shall be very thankful to everyone who can do or help me to do....
thanks.

Jun 18 '06 #4
Actually, as far as the ServerXMLHTTP object is concerned, HTML is
just a string of text. You can break down the individual parts of a
record and put them into a database. You will need to use regular
expression patterns to identify the company name, address, telephone
number etc, to parse the .responseText.

I've used this technique a few times to grap a copy of an online
directory, but you must be aware of copyright issues.

--
Mike Brind
Jeff wrote:
great question. I went to the link provided above, but have this question.

expanding on that, is there any way to break down the actual records instead
of showing everything that is in the HTML?

or is this a stupid question since everything on the client side IS just
html?
i think i answered my own question didn't i


"Rizwan" <ri*********@gmail.com> wrote in message
news:11**********************@i40g2000cwc.googlegr oups.com...
hi there to all......

Is it possible to fetch data records from other website and store in a
database dynamically....
I mean to say i want to fetch data from a yellow pages website .......
showing records of different companies.
i.e, http://www.website.com/data.aspx?Com...&DirectoryID=2
So, now I want a script which goes on this path and copy data after
that go on next page which is CompanyID=3&DirectoryID=2 and follow the
procedure.........
thats it
I shall be very thankful to everyone who can do or help me to do....
thanks.


Jun 19 '06 #5
thanks mike... but can you go into detail a bit more?
how would one go about doing this. How would you isolate say, a name field
out of a complete page of html code?

"Mike Brind" <pa*******@hotmail.com> wrote in message
news:11**********************@r2g2000cwb.googlegro ups.com...
Actually, as far as the ServerXMLHTTP object is concerned, HTML is
just a string of text. You can break down the individual parts of a
record and put them into a database. You will need to use regular
expression patterns to identify the company name, address, telephone
number etc, to parse the .responseText.

I've used this technique a few times to grap a copy of an online
directory, but you must be aware of copyright issues.

--
Mike Brind
Jeff wrote:
great question. I went to the link provided above, but have this
question.

expanding on that, is there any way to break down the actual records
instead
of showing everything that is in the HTML?

or is this a stupid question since everything on the client side IS just
html?
i think i answered my own question didn't i


"Rizwan" <ri*********@gmail.com> wrote in message
news:11**********************@i40g2000cwc.googlegr oups.com...
> hi there to all......
>
> Is it possible to fetch data records from other website and store in a
> database dynamically....
>
>
> I mean to say i want to fetch data from a yellow pages website .......
> showing records of different companies.
> i.e, http://www.website.com/data.aspx?Com...&DirectoryID=2
>
>
> So, now I want a script which goes on this path and copy data after
> that go on next page which is CompanyID=3&DirectoryID=2 and follow the
> procedure.........
>
>
> thats it
>
>
> I shall be very thankful to everyone who can do or help me to do....
>
>
> thanks.
>

Jun 19 '06 #6
sashi
1,754 Recognized Expert Top Contributor
hi guys,

well.. what Mike said is true.. fair enough.. as long as every querystring can be captured.. further processing of the captured querysting can be broken down and data can be further processed to be inserted into database.. give it a tot Mike.. take care guys..
Jun 19 '06 #7
You would have to look for boundaries. What, in the html source,
identifies the beginning and the end of the piece of text you want to
grab? It might be some html tags, eg <h2>Some Company</h2>, or <span
class="companyname">Some Company</span>, or it might just be straight
text eg Company: Some Company followed by a new line. Then you would
have to create a regexp pattern to match it.

In the first case, my pattern would be: "<h2>(.*)<\/h2>". In the last
example, a pattern could be "Company:(.*)".

--
Mike Brind

Jeff wrote:
thanks mike... but can you go into detail a bit more?
how would one go about doing this. How would you isolate say, a name field
out of a complete page of html code?

"Mike Brind" <pa*******@hotmail.com> wrote in message
news:11**********************@r2g2000cwb.googlegro ups.com...
Actually, as far as the ServerXMLHTTP object is concerned, HTML is
just a string of text. You can break down the individual parts of a
record and put them into a database. You will need to use regular
expression patterns to identify the company name, address, telephone
number etc, to parse the .responseText.

I've used this technique a few times to grap a copy of an online
directory, but you must be aware of copyright issues.

--
Mike Brind
Jeff wrote:
great question. I went to the link provided above, but have this
question.

expanding on that, is there any way to break down the actual records
instead
of showing everything that is in the HTML?

or is this a stupid question since everything on the client side IS just
html?
i think i answered my own question didn't i


"Rizwan" <ri*********@gmail.com> wrote in message
news:11**********************@i40g2000cwc.googlegr oups.com...
> hi there to all......
>
> Is it possible to fetch data records from other website and store in a
> database dynamically....
>
>
> I mean to say i want to fetch data from a yellow pages website .......
> showing records of different companies.
> i.e, http://www.website.com/data.aspx?Com...&DirectoryID=2
>
>
> So, now I want a script which goes on this path and copy data after
> that go on next page which is CompanyID=3&DirectoryID=2 and follow the
> procedure.........
>
>
> thats it
>
>
> I shall be very thankful to everyone who can do or help me to do....
>
>
> thanks.
>


Jun 19 '06 #8
understood. so if i am trying to get data from this page say:

http://clanwars.gig-gamers.com/testhtml.asp

which is from pgatour.com for example

i don't see any boundries right off hand. with the exception of a url before
each player name.
so if i wanted to get this data, along with the data presented for each
user, what would my boundries be?
"Mike Brind" <pa*******@hotmail.com> wrote in message
news:11**********************@y41g2000cwy.googlegr oups.com...
You would have to look for boundaries. What, in the html source,
identifies the beginning and the end of the piece of text you want to
grab? It might be some html tags, eg <h2>Some Company</h2>, or <span
class="companyname">Some Company</span>, or it might just be straight
text eg Company: Some Company followed by a new line. Then you would
have to create a regexp pattern to match it.

In the first case, my pattern would be: "<h2>(.*)<\/h2>". In the last
example, a pattern could be "Company:(.*)".

--
Mike Brind

Jeff wrote:
thanks mike... but can you go into detail a bit more?
how would one go about doing this. How would you isolate say, a name
field
out of a complete page of html code?

"Mike Brind" <pa*******@hotmail.com> wrote in message
news:11**********************@r2g2000cwb.googlegro ups.com...
> Actually, as far as the ServerXMLHTTP object is concerned, HTML is
> just a string of text. You can break down the individual parts of a
> record and put them into a database. You will need to use regular
> expression patterns to identify the company name, address, telephone
> number etc, to parse the .responseText.
>
> I've used this technique a few times to grap a copy of an online
> directory, but you must be aware of copyright issues.
>
> --
> Mike Brind
>
>
> Jeff wrote:
>> great question. I went to the link provided above, but have this
>> question.
>>
>> expanding on that, is there any way to break down the actual records
>> instead
>> of showing everything that is in the HTML?
>>
>> or is this a stupid question since everything on the client side IS
>> just
>> html?
>> i think i answered my own question didn't i
>>
>>
>>
>>
>> "Rizwan" <ri*********@gmail.com> wrote in message
>> news:11**********************@i40g2000cwc.googlegr oups.com...
>> > hi there to all......
>> >
>> > Is it possible to fetch data records from other website and store in
>> > a
>> > database dynamically....
>> >
>> >
>> > I mean to say i want to fetch data from a yellow pages website
>> > .......
>> > showing records of different companies.
>> > i.e, http://www.website.com/data.aspx?Com...&DirectoryID=2
>> >
>> >
>> > So, now I want a script which goes on this path and copy data after
>> > that go on next page which is CompanyID=3&DirectoryID=2 and follow
>> > the
>> > procedure.........
>> >
>> >
>> > thats it
>> >
>> >
>> > I shall be very thankful to everyone who can do or help me to do....
>> >
>> >
>> > thanks.
>> >
>

Jun 19 '06 #9
Dunno. You would have to sort this out first:

Active Server Pages error 'ASP 0138'

Nested Script Block

/testhtml.asp, line 94

A script block cannot be placed inside another script block.

:-)

--
Mike Brind
Jeff wrote:
understood. so if i am trying to get data from this page say:

http://clanwars.gig-gamers.com/testhtml.asp

which is from pgatour.com for example

i don't see any boundries right off hand. with the exception of a url before
each player name.
so if i wanted to get this data, along with the data presented for each
user, what would my boundries be?
"Mike Brind" <pa*******@hotmail.com> wrote in message
news:11**********************@y41g2000cwy.googlegr oups.com...
You would have to look for boundaries. What, in the html source,
identifies the beginning and the end of the piece of text you want to
grab? It might be some html tags, eg <h2>Some Company</h2>, or <span
class="companyname">Some Company</span>, or it might just be straight
text eg Company: Some Company followed by a new line. Then you would
have to create a regexp pattern to match it.

In the first case, my pattern would be: "<h2>(.*)<\/h2>". In the last
example, a pattern could be "Company:(.*)".

--
Mike Brind

Jeff wrote:
thanks mike... but can you go into detail a bit more?
how would one go about doing this. How would you isolate say, a name
field
out of a complete page of html code?

"Mike Brind" <pa*******@hotmail.com> wrote in message
news:11**********************@r2g2000cwb.googlegro ups.com...
> Actually, as far as the ServerXMLHTTP object is concerned, HTML is
> just a string of text. You can break down the individual parts of a
> record and put them into a database. You will need to use regular
> expression patterns to identify the company name, address, telephone
> number etc, to parse the .responseText.
>
> I've used this technique a few times to grap a copy of an online
> directory, but you must be aware of copyright issues.
>
> --
> Mike Brind
>
>
> Jeff wrote:
>> great question. I went to the link provided above, but have this
>> question.
>>
>> expanding on that, is there any way to break down the actual records
>> instead
>> of showing everything that is in the HTML?
>>
>> or is this a stupid question since everything on the client side IS
>> just
>> html?
>> i think i answered my own question didn't i
>>
>>
>>
>>
>> "Rizwan" <ri*********@gmail.com> wrote in message
>> news:11**********************@i40g2000cwc.googlegr oups.com...
>> > hi there to all......
>> >
>> > Is it possible to fetch data records from other website and store in
>> > a
>> > database dynamically....
>> >
>> >
>> > I mean to say i want to fetch data from a yellow pages website
>> > .......
>> > showing records of different companies.
>> > i.e, http://www.website.com/data.aspx?Com...&DirectoryID=2
>> >
>> >
>> > So, now I want a script which goes on this path and copy data after
>> > that go on next page which is CompanyID=3&DirectoryID=2 and follow
>> > the
>> > procedure.........
>> >
>> >
>> > thats it
>> >
>> >
>> > I shall be very thankful to everyone who can do or help me to do....
>> >
>> >
>> > thanks.
>> >
>


Jun 19 '06 #10
Jeff wrote:
understood. so if i am trying to get data from this page say:

http://clanwars.gig-gamers.com/testhtml.asp

Active Server Pages error 'ASP 0138'

Nested Script Block

/testhtml.asp, line 94

A script block cannot be placed inside another script block.

Rather than pointing us at a url, post some of the page's source (NOT
THE WHOLE PAGE!)
which is from pgatour.com for example

i don't see any boundries right off hand. with the exception of a url
before each player name.
so if i wanted to get this data, along with the data presented for
each user, what would my boundries be?


Sounds to me as if you need to visit those urls ...


--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
Jun 19 '06 #11
sorry guys.... here is some of the html. just a few players worth

<tr>
<th class="c1" rowSpan="2">
<a
href="http://www.golfweb.com/tournaments/usopen/leaderboard/rank/2006">
Pos</a></th>
<th class="c1" vAlign="center" rowSpan="2">Player Name<br>
<a
href="http://www.golfweb.com/tournaments/usopen/leaderboard/first/2006">
First</a>/<a
href="http://www.golfweb.com/tournaments/usopen/leaderboard/last/2006">Last</a></th>
<th class="c1" colSpan="3">Scoring</th>
<th class="c1" colSpan="4">Rounds</th>
<th class="c1" vAlign="center" rowSpan="2">
<a
href="http://www.golfweb.com/tournaments/usopen/leaderboard/rank/2006">
Total<br>
Score</a></th>
</tr>
<tr>
<th class="cc">
<a
href="http://www.golfweb.com/tournaments/usopen/leaderboard/today/2006">
Today</a></th>
<th class="cc">
<a
href="http://www.golfweb.com/tournaments/usopen/leaderboard/hole/2006">
Thru</a></th>
<th class="cc">
<a
href="http://www.golfweb.com/tournaments/usopen/leaderboard/rank/2006">
To Par</a></th>
<th class="cc">
<a
href="http://www.golfweb.com/tournaments/usopen/leaderboard/r1/2006">
1</a></th>
<th class="cc">
<a
href="http://www.golfweb.com/tournaments/usopen/leaderboard/r2/2006">
2</a></th>
<th class="cc">
<a
href="http://www.golfweb.com/tournaments/usopen/leaderboard/r3/2006">
3</a></th>
<th bgColor="#ffffff">
<a
href="http://www.golfweb.com/tournaments/usopen/leaderboard/r4/2006">
4</a></th>
</tr>
<tr>
<th bgColor="#ffffff">1</th>
<td bgColor="#ffffff">
<a
href="http://www.golfweb.com/tournaments/usopen/scorecards/2006/238088">
Geoff Ogilvy</a>&nbsp;<img
src="http://images.golfweb.com/u/photos/misc/titleist_sm.gif"
border="0"></td>
<th bgColor="#ffffff">+2</th>
<th bgColor="#ffffff">F</th>
<th bgColor="#ffffff">+5</th>
<th bgColor="#ffffff">71</th>
<th bgColor="#ffffff">70</th>
<th bgColor="#ffffff">72</th>
<th bgColor="#ffffff">72</th>
<th bgColor="#ffffff">285</th>
</tr>
<tr>
<th bgColor="#ffffff">2</th>
<td bgColor="#ffffff">
<a
href="http://www.golfweb.com/tournaments/usopen/scorecards/2006/132075">
Phil Mickelson</a>&nbsp;</td>
<th bgColor="#ffffff">+4</th>
<th bgColor="#ffffff">F</th>
<th bgColor="#ffffff">+6</th>
<th bgColor="#ffffff">70</th>
<th bgColor="#ffffff">73</th>
<th bgColor="#ffffff">69</th>
<th bgColor="#ffffff">74</th>
<th bgColor="#ffffff">286</th>
</tr>
<tr>
<th bgColor="#ffffff">2</th>
<td bgColor="#ffffff">
<a
href="http://www.golfweb.com/tournaments/usopen/scorecards/2006/399352">
Colin Montgomerie</a>&nbsp;</td>
<th bgColor="#ffffff">+1</th>
<th bgColor="#ffffff">F</th>
<th bgColor="#ffffff">+6</th>
<th bgColor="#ffffff">69</th>
<th bgColor="#ffffff">71</th>
<th bgColor="#ffffff">75</th>
<th bgColor="#ffffff">71</th>
<th bgColor="#ffffff">286</th>
</tr>
<tr>
<th bgColor="#ffffff">2</th>
<td bgColor="#ffffff">
<a
href="http://www.golfweb.com/tournaments/usopen/scorecards/2006/132018">
Jim Furyk</a>&nbsp;</td>
<th bgColor="#ffffff">E</th>
<th bgColor="#ffffff">F</th>
<th bgColor="#ffffff">+6</th>
<th bgColor="#ffffff">70</th>
<th bgColor="#ffffff">72</th>
<th bgColor="#ffffff">74</th>
<th bgColor="#ffffff">70</th>
<th bgColor="#ffffff">286</th>
</tr>
<tr>
<th bgColor="#ffffff">5</th>
<td bgColor="#ffffff">
<a
href="http://www.golfweb.com/tournaments/usopen/scorecards/2006/399340">
Padraig Harrington</a>&nbsp;<img
src="http://images.golfweb.com/u/photos/misc/titleist_sm.gif"
border="0"></td>
<th bgColor="#ffffff">+1</th>
<th bgColor="#ffffff">F</th>
<th bgColor="#ffffff">+7</th>
<th bgColor="#ffffff">73</th>
<th bgColor="#ffffff">69</th>
<th bgColor="#ffffff">74</th>
<th bgColor="#ffffff">71</th>
<th bgColor="#ffffff">287</th>
</tr>


"Mike Brind" <pa*******@hotmail.com> wrote in message
news:11**********************@y41g2000cwy.googlegr oups.com...
Dunno. You would have to sort this out first:

Active Server Pages error 'ASP 0138'

Nested Script Block

/testhtml.asp, line 94

A script block cannot be placed inside another script block.

:-)

--
Mike Brind
Jeff wrote:
understood. so if i am trying to get data from this page say:

http://clanwars.gig-gamers.com/testhtml.asp

which is from pgatour.com for example

i don't see any boundries right off hand. with the exception of a url
before
each player name.
so if i wanted to get this data, along with the data presented for each
user, what would my boundries be?
"Mike Brind" <pa*******@hotmail.com> wrote in message
news:11**********************@y41g2000cwy.googlegr oups.com...
> You would have to look for boundaries. What, in the html source,
> identifies the beginning and the end of the piece of text you want to
> grab? It might be some html tags, eg <h2>Some Company</h2>, or <span
> class="companyname">Some Company</span>, or it might just be straight
> text eg Company: Some Company followed by a new line. Then you would
> have to create a regexp pattern to match it.
>
> In the first case, my pattern would be: "<h2>(.*)<\/h2>". In the last
> example, a pattern could be "Company:(.*)".
>
> --
> Mike Brind
>
> Jeff wrote:
>> thanks mike... but can you go into detail a bit more?
>> how would one go about doing this. How would you isolate say, a name
>> field
>> out of a complete page of html code?
>>
>> "Mike Brind" <pa*******@hotmail.com> wrote in message
>> news:11**********************@r2g2000cwb.googlegro ups.com...
>> > Actually, as far as the ServerXMLHTTP object is concerned, HTML is
>> > just a string of text. You can break down the individual parts of a
>> > record and put them into a database. You will need to use regular
>> > expression patterns to identify the company name, address, telephone
>> > number etc, to parse the .responseText.
>> >
>> > I've used this technique a few times to grap a copy of an online
>> > directory, but you must be aware of copyright issues.
>> >
>> > --
>> > Mike Brind
>> >
>> >
>> > Jeff wrote:
>> >> great question. I went to the link provided above, but have this
>> >> question.
>> >>
>> >> expanding on that, is there any way to break down the actual
>> >> records
>> >> instead
>> >> of showing everything that is in the HTML?
>> >>
>> >> or is this a stupid question since everything on the client side IS
>> >> just
>> >> html?
>> >> i think i answered my own question didn't i
>> >>
>> >>
>> >>
>> >>
>> >> "Rizwan" <ri*********@gmail.com> wrote in message
>> >> news:11**********************@i40g2000cwc.googlegr oups.com...
>> >> > hi there to all......
>> >> >
>> >> > Is it possible to fetch data records from other website and store
>> >> > in
>> >> > a
>> >> > database dynamically....
>> >> >
>> >> >
>> >> > I mean to say i want to fetch data from a yellow pages website
>> >> > .......
>> >> > showing records of different companies.
>> >> > i.e, http://www.website.com/data.aspx?Com...&DirectoryID=2
>> >> >
>> >> >
>> >> > So, now I want a script which goes on this path and copy data
>> >> > after
>> >> > that go on next page which is CompanyID=3&DirectoryID=2 and
>> >> > follow
>> >> > the
>> >> > procedure.........
>> >> >
>> >> >
>> >> > thats it
>> >> >
>> >> >
>> >> > I shall be very thankful to everyone who can do or help me to
>> >> > do....
>> >> >
>> >> >
>> >> > thanks.
>> >> >
>> >
>

Jun 19 '06 #12

"Jeff" <gi*****@adelphia.net> wrote in message
news:5r******************************@adelphia.com ...
sorry guys.... here is some of the html. just a few players worth

<tr>
<th class="c1" rowSpan="2">
<a
href="http://www.golfweb.com/tournaments/usopen/leaderboard/rank/2006">
Pos</a></th>
<th class="c1" vAlign="center" rowSpan="2">Player Name<br> <a
href="http://www.golfweb.com/tournaments/usopen/leaderboard/first/2006">
First</a>/<a
href="http://www.golfweb.com/tournaments/usopen/leaderboard/last/2006">Last<
/a></th> <th class="c1" colSpan="3">Scoring</th>
<th class="c1" colSpan="4">Rounds</th>
<th class="c1" vAlign="center" rowSpan="2">
<a
href="http://www.golfweb.com/tournaments/usopen/leaderboard/rank/2006">
Total<br>
Score</a></th>
</tr>
<tr>
<th class="cc">
<a
href="http://www.golfweb.com/tournaments/usopen/leaderboard/today/2006">
Today</a></th>
<th class="cc">
<a
href="http://www.golfweb.com/tournaments/usopen/leaderboard/hole/2006">
Thru</a></th>
<th class="cc">
<a
href="http://www.golfweb.com/tournaments/usopen/leaderboard/rank/2006">
To Par</a></th>
<th class="cc">
<a
href="http://www.golfweb.com/tournaments/usopen/leaderboard/r1/2006">
1</a></th>
<th class="cc">
<a
href="http://www.golfweb.com/tournaments/usopen/leaderboard/r2/2006">
2</a></th>
<th class="cc">
<a
href="http://www.golfweb.com/tournaments/usopen/leaderboard/r3/2006">
3</a></th>
<th bgColor="#ffffff">
<a
href="http://www.golfweb.com/tournaments/usopen/leaderboard/r4/2006">
4</a></th>
</tr>
<tr>
<th bgColor="#ffffff">1</th>
<td bgColor="#ffffff">
<a
href="http://www.golfweb.com/tournaments/usopen/scorecards/2006/238088">
Geoff Ogilvy</a>&nbsp;<img
src="http://images.golfweb.com/u/photos/misc/titleist_sm.gif"
border="0"></td>
<th bgColor="#ffffff">+2</th>
<th bgColor="#ffffff">F</th>
<th bgColor="#ffffff">+5</th>
<th bgColor="#ffffff">71</th>
<th bgColor="#ffffff">70</th>
<th bgColor="#ffffff">72</th>
<th bgColor="#ffffff">72</th>
<th bgColor="#ffffff">285</th>
</tr>
<tr>
<th bgColor="#ffffff">2</th>
<td bgColor="#ffffff">
<a
href="http://www.golfweb.com/tournaments/usopen/scorecards/2006/132075">
Phil Mickelson</a>&nbsp;</td>
<th bgColor="#ffffff">+4</th>
<th bgColor="#ffffff">F</th>
<th bgColor="#ffffff">+6</th>
<th bgColor="#ffffff">70</th>
<th bgColor="#ffffff">73</th>
<th bgColor="#ffffff">69</th>
<th bgColor="#ffffff">74</th>
<th bgColor="#ffffff">286</th>
</tr>
<tr>
<th bgColor="#ffffff">2</th>
<td bgColor="#ffffff">
<a
href="http://www.golfweb.com/tournaments/usopen/scorecards/2006/399352">
Colin Montgomerie</a>&nbsp;</td>
<th bgColor="#ffffff">+1</th>
<th bgColor="#ffffff">F</th>
<th bgColor="#ffffff">+6</th>
<th bgColor="#ffffff">69</th>
<th bgColor="#ffffff">71</th>
<th bgColor="#ffffff">75</th>
<th bgColor="#ffffff">71</th>
<th bgColor="#ffffff">286</th>
</tr>
<tr>
<th bgColor="#ffffff">2</th>
<td bgColor="#ffffff">
<a
href="http://www.golfweb.com/tournaments/usopen/scorecards/2006/132018">
Jim Furyk</a>&nbsp;</td>
<th bgColor="#ffffff">E</th>
<th bgColor="#ffffff">F</th>
<th bgColor="#ffffff">+6</th>
<th bgColor="#ffffff">70</th>
<th bgColor="#ffffff">72</th>
<th bgColor="#ffffff">74</th>
<th bgColor="#ffffff">70</th>
<th bgColor="#ffffff">286</th>
</tr>
<tr>
<th bgColor="#ffffff">5</th>
<td bgColor="#ffffff">
<a
href="http://www.golfweb.com/tournaments/usopen/scorecards/2006/399340">
Padraig Harrington</a>&nbsp;<img
src="http://images.golfweb.com/u/photos/misc/titleist_sm.gif"
border="0"></td>
<th bgColor="#ffffff">+1</th>
<th bgColor="#ffffff">F</th>
<th bgColor="#ffffff">+7</th>
<th bgColor="#ffffff">73</th>
<th bgColor="#ffffff">69</th>
<th bgColor="#ffffff">74</th>
<th bgColor="#ffffff">71</th>
<th bgColor="#ffffff">287</th>
</tr>


Use something like this:-
Dim rgx
Dim oMatches
Dim oMatch

Set rgx = new RegExp
' Remove below is one line.
rgx.Pattern =
"<a\W+href=""http://www.golfweb.com/tournaments/usopen/scorecards/2006/(\d+)
"">\W*(.*?)\W*</a>"

rgx.Global = True
rgx.IgnoreCase = true

Set oMatches = rgx.Execute(sInputHTML)

For each oMatch in oMatches
'oMatch.SubMatches(0) contains the player ID
'oMatch.SubMatches(1) contains the player name
Next
Anthony.
Jun 20 '06 #13

Anthony Jones wrote:
"Jeff" <gi*****@adelphia.net> wrote in message
news:5r******************************@adelphia.com ...
sorry guys.... here is some of the html. just a few players worth

<snipped>
<a
href="http://www.golfweb.com/tournaments/usopen/scorecards/2006/238088">
Geoff Ogilvy</a>&nbsp;<img
src="http://images.golfweb.com/u/photos/misc/titleist_sm.gif"
border="0"></td>
<snipped>


Use something like this:-
Dim rgx
Dim oMatches
Dim oMatch

Set rgx = new RegExp
' Remove below is one line.
rgx.Pattern =
"<a\W+href=""http://www.golfweb.com/tournaments/usopen/scorecards/2006/(\d+)
"">\W*(.*?)\W*</a>"

rgx.Global = True
rgx.IgnoreCase = true

Set oMatches = rgx.Execute(sInputHTML)

For each oMatch in oMatches
'oMatch.SubMatches(0) contains the player ID
'oMatch.SubMatches(1) contains the player name
Next


Mine was like this:

Set objRegExpr = New regexp
objRegExpr.Pattern = "2006\/\d{6}" & chr(34) & ">\W*(.*?)\W*<"
objRegExpr.Global = True
objRegExpr.IgnoreCase = True
set colmatches = objRegExpr.Execute(strSearchOn)
'response.write colMatches.Count
For Each objMatch in colMatches
Response.Write objMatch.SubMatches(0) & "<br>"
Next

I didn't bother with the ID, which I assumed from the example was
always 6 digits.

:-)

--
Mike Brind

Jun 20 '06 #14
ok.. this all is getting interesting.
so if i am reading this correctly, this is picking up the column values
based on the pattern with the name or id??
"Mike Brind" <pa*******@hotmail.com> wrote in message
news:11*********************@y41g2000cwy.googlegro ups.com...

Anthony Jones wrote:
"Jeff" <gi*****@adelphia.net> wrote in message
news:5r******************************@adelphia.com ...
> sorry guys.... here is some of the html. just a few players worth
>
<snipped>
> <a
> href="http://www.golfweb.com/tournaments/usopen/scorecards/2006/238088">
> Geoff Ogilvy</a>&nbsp;<img
> src="http://images.golfweb.com/u/photos/misc/titleist_sm.gif"
> border="0"></td>
<snipped>
>


Use something like this:-
Dim rgx
Dim oMatches
Dim oMatch

Set rgx = new RegExp
' Remove below is one line.
rgx.Pattern =
"<a\W+href=""http://www.golfweb.com/tournaments/usopen/scorecards/2006/(\d+)
"">\W*(.*?)\W*</a>"

rgx.Global = True
rgx.IgnoreCase = true

Set oMatches = rgx.Execute(sInputHTML)

For each oMatch in oMatches
'oMatch.SubMatches(0) contains the player ID
'oMatch.SubMatches(1) contains the player name
Next


Mine was like this:

Set objRegExpr = New regexp
objRegExpr.Pattern = "2006\/\d{6}" & chr(34) & ">\W*(.*?)\W*<"
objRegExpr.Global = True
objRegExpr.IgnoreCase = True
set colmatches = objRegExpr.Execute(strSearchOn)
'response.write colMatches.Count
For Each objMatch in colMatches
Response.Write objMatch.SubMatches(0) & "<br>"
Next

I didn't bother with the ID, which I assumed from the example was
always 6 digits.

:-)

--
Mike Brind

Jun 20 '06 #15
No. It's picking out values from a text string (the html code in the
page) that match the pattern provided to the RegExp object. It has no
concept of column values or names or ids. Anthony's pattern has two
parts in brackets. Those parts match the position of an id number that
he identified from looking at the html, and the position of the name of
the player. While the whole hyperlink is matched, and any others that
have the same pattern in the html, those two bracketed parts are stored
in the SubMatches collection for later use, and are referenced through
their ordinal position.

So you create your own database, with your own table and column names
and within the For ... Next loop, you run an ADO insert into your
database:

For each oMatch in oMatches
'oMatch.SubMatches(0) contains the player ID
'oMatch.SubMatches(1) contains the player name
conn.execute("INSERT INTO <table> (PlayerID, PlayerName) VALUES ("
& oMatch.SubMatches(0) & ",'" & oMatch.SubMatches(1) & "')")
Next

Scott Mitchell has put together a very good set of articles on regular
expressions:
http://www.4guysfromrolla.com/webtec...ressions.shtml

--
Mike Brind

Jeff wrote:
ok.. this all is getting interesting.
so if i am reading this correctly, this is picking up the column values
based on the pattern with the name or id??
"Mike Brind" <pa*******@hotmail.com> wrote in message
news:11*********************@y41g2000cwy.googlegro ups.com...

Anthony Jones wrote:
"Jeff" <gi*****@adelphia.net> wrote in message
news:5r******************************@adelphia.com ...
> sorry guys.... here is some of the html. just a few players worth
>


<snipped>
> <a
> href="http://www.golfweb.com/tournaments/usopen/scorecards/2006/238088">
> Geoff Ogilvy</a>&nbsp;<img
> src="http://images.golfweb.com/u/photos/misc/titleist_sm.gif"
> border="0"></td>


<snipped>
>

Use something like this:-
Dim rgx
Dim oMatches
Dim oMatch

Set rgx = new RegExp
' Remove below is one line.
rgx.Pattern =
"<a\W+href=""http://www.golfweb.com/tournaments/usopen/scorecards/2006/(\d+)
"">\W*(.*?)\W*</a>"

rgx.Global = True
rgx.IgnoreCase = true

Set oMatches = rgx.Execute(sInputHTML)

For each oMatch in oMatches
'oMatch.SubMatches(0) contains the player ID
'oMatch.SubMatches(1) contains the player name
Next


Mine was like this:

Set objRegExpr = New regexp
objRegExpr.Pattern = "2006\/\d{6}" & chr(34) & ">\W*(.*?)\W*<"
objRegExpr.Global = True
objRegExpr.IgnoreCase = True
set colmatches = objRegExpr.Execute(strSearchOn)
'response.write colMatches.Count
For Each objMatch in colMatches
Response.Write objMatch.SubMatches(0) & "<br>"
Next

I didn't bother with the ID, which I assumed from the example was
always 6 digits.

:-)

--
Mike Brind


Jun 21 '06 #16
ok.. thanks for all the help guys... most appreciated
"Mike Brind" <pa*******@hotmail.com> wrote in message
news:11*********************@b68g2000cwa.googlegro ups.com...
No. It's picking out values from a text string (the html code in the
page) that match the pattern provided to the RegExp object. It has no
concept of column values or names or ids. Anthony's pattern has two
parts in brackets. Those parts match the position of an id number that
he identified from looking at the html, and the position of the name of
the player. While the whole hyperlink is matched, and any others that
have the same pattern in the html, those two bracketed parts are stored
in the SubMatches collection for later use, and are referenced through
their ordinal position.

So you create your own database, with your own table and column names
and within the For ... Next loop, you run an ADO insert into your
database:

For each oMatch in oMatches
'oMatch.SubMatches(0) contains the player ID
'oMatch.SubMatches(1) contains the player name
conn.execute("INSERT INTO <table> (PlayerID, PlayerName) VALUES ("
& oMatch.SubMatches(0) & ",'" & oMatch.SubMatches(1) & "')")
Next

Scott Mitchell has put together a very good set of articles on regular
expressions:
http://www.4guysfromrolla.com/webtec...ressions.shtml

--
Mike Brind

Jeff wrote:
ok.. this all is getting interesting.
so if i am reading this correctly, this is picking up the column values
based on the pattern with the name or id??
"Mike Brind" <pa*******@hotmail.com> wrote in message
news:11*********************@y41g2000cwy.googlegro ups.com...
>
> Anthony Jones wrote:
>> "Jeff" <gi*****@adelphia.net> wrote in message
>> news:5r******************************@adelphia.com ...
>> > sorry guys.... here is some of the html. just a few players worth
>> >
>
> <snipped>
>
>> > <a
>> > href="http://www.golfweb.com/tournaments/usopen/scorecards/2006/238088">
>> > Geoff Ogilvy</a>&nbsp;<img
>> > src="http://images.golfweb.com/u/photos/misc/titleist_sm.gif"
>> > border="0"></td>
>
> <snipped>
>
>> >
>>
>> Use something like this:-
>>
>>
>> Dim rgx
>> Dim oMatches
>> Dim oMatch
>>
>> Set rgx = new RegExp
>> ' Remove below is one line.
>> rgx.Pattern =
>> "<a\W+href=""http://www.golfweb.com/tournaments/usopen/scorecards/2006/(\d+)
>> "">\W*(.*?)\W*</a>"
>>
>> rgx.Global = True
>> rgx.IgnoreCase = true
>>
>> Set oMatches = rgx.Execute(sInputHTML)
>>
>> For each oMatch in oMatches
>> 'oMatch.SubMatches(0) contains the player ID
>> 'oMatch.SubMatches(1) contains the player name
>> Next
>>
>
> Mine was like this:
>
> Set objRegExpr = New regexp
> objRegExpr.Pattern = "2006\/\d{6}" & chr(34) & ">\W*(.*?)\W*<"
> objRegExpr.Global = True
> objRegExpr.IgnoreCase = True
> set colmatches = objRegExpr.Execute(strSearchOn)
> 'response.write colMatches.Count
> For Each objMatch in colMatches
> Response.Write objMatch.SubMatches(0) & "<br>"
> Next
>
> I didn't bother with the ID, which I assumed from the example was
> always 6 digits.
>
> :-)
>
> --
> Mike Brind
>

Jun 21 '06 #17

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

21
6485
by: Dave | last post by:
After following Microsofts admonition to reformat my system before doing a final compilation of my app I got many warnings/errors upon compiling an rtf file created in word. I used the Help...
9
4374
by: Tom | last post by:
A question for gui application programmers. . . I 've got some GUI programs, written in Python/wxPython, and I've got a help button and a help menu item. Also, I've got a compiled file made with...
6
4303
by: wukexin | last post by:
Help me, good men. I find mang books that introduce bit "mang header files",they talk too bit,in fact it is my too fool, I don't learn it, I have do a test program, but I have no correct doing...
3
3322
by: Colin J. Williams | last post by:
Python advertises some basic service: C:\Python24>python Python 2.4.1 (#65, Mar 30 2005, 09:13:57) on win32 Type "help", "copyright", "credits" or "license" for more information. >>> With...
7
5343
by: Corepaul | last post by:
Missing Help Files When I enter "recordset" as the keyword and search the Visual Basic Help index, I get many topics of interest in the resulting list. But there isn't any information available...
5
3249
by: Steve | last post by:
I have written a help file (chm) for a DLL and referenced it using Help.ShowHelp My expectation is that a developer using my DLL would be able to access this help file during his development time...
8
3206
by: Mark | last post by:
I have loaded Visual Studio .net on my home computer and my laptop, but my home computer has an abbreviated help screen not 2% of the help on my laptop. All the settings look the same on both...
10
3327
by: JonathanOrlev | last post by:
Hello everybody, I wrote this comment in another message of mine, but decided to post it again as a standalone message. I think that Microsoft's Office 2003 help system is horrible, probably...
1
6111
by: trunxnirvana007 | last post by:
'UPGRADE_WARNING: Array has a new behavior. Click for more: 'ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?keyword="9B7D5ADD-D8FE-4819-A36C-6DEDAF088CC7"' 'UPGRADE_WARNING: Couldn't resolve...
0
2848
by: hitencontractor | last post by:
I am working on .NET Version 2003 making an SDI application that calls MS Excel 2003. I added a menu item called "MyApp Help" in the end of the menu bar to show Help-> About. The application...
0
7070
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
1
6976
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7449
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
4993
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4666
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3160
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3148
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1495
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
729
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.