HTML DOM Parse Page

Completed Posted Aug 25, 2011 Paid on delivery
Completed Paid on delivery

Use html dom parser to parse the games on the attached page and throw it into the $game array like the sample code below. Please bid if you are familiar with sports lines. Must have every game on this page.

foreach ($html->find('[url removed, login to view]') as $row) {

if ( strlen($row->children(1)->plaintext) <= 4) {

$game_number = $row->children(1)->plaintext;

$team_name = $row->children(2)->plaintext;

$runline_odd = $row->children($r)->plaintext;

$runline_input_name = $row->children($r)->find('input[type="checkbox"]', 0)->name;

$runline_input_value = $row->children($r)->find('input[type="checkbox"]', 0)->value;

$total_odd = $row->children($p)->plaintext;

$total_input_name = $row->children($p)->find('input[type="checkbox"]', 0)->name;

$total_input_value = $row->children($p)->find('input[type="checkbox"]', 0)->value;

} else {

$game_number = $row->children(2)->plaintext;

$team_name = $row->children(3)->plaintext;

$runline_odd = $row->children($r)->plaintext;

$runline_input_name = $row->children($r)->find('input[type="checkbox"]', 0)->name;

$runline_input_value = $row->children($r)->find('input[type="checkbox"]', 0)->value;

$total_odd = $row->children($p)->plaintext;

$total_input_name = $row->children($p)->find('input[type="checkbox"]', 0)->name;

$total_input_value = $row->children($p)->find('input[type="checkbox"]', 0)->value;

}

$game[$game_number] = array(

'game_number' => $game_number,

'team_name' => $team_name,

'runline_odd' => $runline_odd,

'runline_input_name' => $runline_input_name,

'runline_input_value' => $runline_input_value,

'total_odd' => $total_odd,

'total_input_name' => $total_input_name,

'total_input_value' => $total_input_value

);

}

ksort($game);

print_r($game);

PHP

Project ID: #1181815

About the project

6 proposals Remote project Active Sep 1, 2011

Awarded to:

freelance4hire80

I can write the PHP script for you to parse the HTML page into array.

$60 USD in 1 day
(8 Reviews)
4.0

6 freelancers are bidding on average $95 for this job

SigmaVisual

We can help in your project, please check PMB and our ratings/reviews to get idea of our experience.

$200 USD in 5 days
(219 Reviews)
7.7
srinichal

I look forward to deliver the same

$80 USD in 2 days
(80 Reviews)
6.9
zeke

Hello! I have a lot of experience with data extracting from HTMl. Please provide more details in PMB to let me estimate price and delivery time. Thank you, Zeke

$100 USD in 1 day
(141 Reviews)
6.7
mantislin

Hi sir, Please check PM.

$80 USD in 2 days
(118 Reviews)
6.4
rfedorov

Hello, i'd like to work with you on this project! I've made already a project very similar: http://www.freelancer.com/projects/PHP/Parse-webpage.html Please check kindly the private message. Regards

$50 USD in 1 day
(25 Reviews)
5.5