Problem with PHP Scraper for a public Site

Links for php scripts

Moderators: macek, egami, gesf

shobhit
New php-forum User
New php-forum User
Posts: 1
Joined: Sun Feb 12, 2012 9:33 pm

Problem with PHP Scraper for a public Site

Postby shobhit » Sun Feb 12, 2012 9:43 pm

hi,

i am writing a spider script, for a project.
the problem that i am facing is that the site on which i am trying to extract the data have the following format.



<div id="content">
<div class="start"> 1
</div>
<div class="xyz"> xyz 1.1
</div>
<div class="xyz"> xyz 1.2
</div>
<div class="xyz"> xyz 1.3
</div>
<div class="xyz"> xyz 1.4
</div>

<div class="start"> 2
</div>
<div class="xyz"> xyz 2.1
</div>
<div class="xyz"> xyz 2.2
</div>
<div class="xyz"> xyz 2.3
</div>
<div class="xyz"> xyz 2.4
</div>
<div class="xyz"> xyz 2.5
</div>
<div class="xyz"> xyz 2.6
</div>

<div class="start"> 3
</div>
<div class="xyz"> xyz 3.1
</div>
<div class="xyz"> xyz 3.2
</div>
<div class="xyz"> xyz 3.3
</div>


</div>

the start div info has to be associated with the xyz div underneath that start div.
when i extract it shows all the xyz 3 times because it has 3 start div.
How can i achieve the desired result.

Any help would be appreciated
Thanks

Return to “PHP Scripts”

Who is online

Users browsing this forum: No registered users and 1 guest

cron