Ditutup

php data scraping fucntion

Projek ini menerima 13 bida daripada freelancer berbakat dengan harga bida purata $37 USD.

Dapatkan sebut harga percuma untuk projek seperti ini
Bajet Projek
N/A
Jumlah Bida
13
Penerangan Projek

We need a simple php scraping function that returns an array as follows:

function getLeaderboards ( $p_source ) {

if ($p_source == "ultimatebet") {

$url = "[url removed, login to view];;

}

//scraping code goes here

//array is populated here based on the above scraping code

return $array ;

}

We will call the function as follows for testing purposes:

//ultimatebet call

$myresults=getLeaderboards("ultimatebet");

echo '<table><tr><td>Rank</td><td>Player ID</td><td>Chips</td></tr>';

foreach ($myresults as $item) {

echo '<tr><td>'.$item["rank"].'</td><td>'.$item["playername"].'</td><td>'.$item["score"].'</td></tr>';

}

echo '</table>';

Please look at the [url removed, login to view] page (under MONTHLY) carefully and note that Place corresponds to $item["rank"], Username corresponds to $item["playername"] and Points Earned corresponds to $item["score"]. We need to scrape all 100 positions on the page.

We're running php4.

Kemahiran Diperlukan

Mencari untuk memperoleh sedikit wang?

  • Tetapkan bajet anda dan tempoh masa
  • Rangkakan cadangan anda
  • Dibayar untuk kerja anda

Upah Freelancer yang juga membida projek ini

    • Forbes
    • The New York Times
    • Time
    • Wall Street Journal
    • Times Online