HTML DOM Parse Page

Končano Objavljeno Aug 25, 2011 Plačilo ob prevzemu
Končano Plačilo ob prevzemu

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

ID projekta: #1181815

Več o projektu

6 predlogov Oddaljen projekt Aktiven Sep 1, 2011

Dodeljeno:

freelance4hire80

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

$60 USD v 1 dnevu
(8 mnenj)
4.0

6 freelancerjev ponuja v povprečju za $95 na tem delu

SigmaVisual

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

$200 USD v 5 dneh
(219 ocen)
7.7
srinichal

I look forward to deliver the same

$80 USD v 2 dneh
(80 ocen)
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 v 1 dnevu
(141 ocen)
6.7
mantislin

Hi sir, Please check PM.

$80 USD v 2 dneh
(118 ocen)
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 v 1 dnevu
(25 ocen)
5.5