What I need to do is get raw data off of a page on another server and into a mysql db on my server. I know a little about php, and have been trying for the past couple hours, but to no avail, so I decided to go look for help. The page that the data is on is: http://www.d2jsp.org/gold_giveaway2.php
Thanks in advance.
[SOLVED] Help reading data from another page!
Moderator: General Moderators
-
TristanOfADown
- Forum Newbie
- Posts: 2
- Joined: Sun Jan 04, 2004 1:12 pm
- Location: 127.0.0.1
Try this on a page and see what that gives you as for clues.
If you are inserting that into a database, the explode() part can be excluded, and use $line instead after abit tweaking around.
Code: Select all
<pre>
<?php
$site = 'http://www.d2jsp.org/gold_giveaway2.php';
$results = file($site);
foreach($results as $line) {
$arr = explode(',',$line);
// To show you what it looks like now...
print_r($arr);
// Add database inserts here etc. etc.
}
?>-
TristanOfADown
- Forum Newbie
- Posts: 2
- Joined: Sun Jan 04, 2004 1:12 pm
- Location: 127.0.0.1