zero-perfoliate
zero-perfoliate

Author Topic: Retrieving data from another website  (Read 247 times)

Offline Candan

  • New PHP Members
  • Posts: 1
  • Karma: +0/-0
Retrieving data from another website
« on: May 23, 2009, 11:47:21 PM »
Hello, I've got a webserver, where some sort of game is hosted. Now I want to localhost a signature maker,t hat retrieves data from that specific website. I'm using the eregi methid to get my data, but I stumbled upon something.

The particular line of code taht I'm trying to get a specific number out:
Code: [Select]
<div class="value" onmouseover="mt.js.Tip.show(this,'Number of victories in the Arena.',null)" onmouseout="mt.js.Tip.hide()">8</div>
The specific number on this line is the 8. It is going to be dynamic, so it can change at any time.

This is my code to retrieve it, but it does not work:

Code: [Select]
<?php
   $lines_array3 
file($url);
   
$lines_string3 implode(''$lines_array3);
   
eregi("<div class=\"value\" onmouseover=\"mt.js.Tip.show(this,'Number of victories in the Arena.',null)\" onmouseout=\"mt.js.Tip.hide()\">(.*)</div>"$lines_string3$mydata3);
   
$victories $mydata3[0];
   echo 
$victories,"<br><br>";
?>