473,396 Members | 2,011 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

parseing text file from web server

I play a game that has raw news feeds stored in txt on there website. located
[HTML]http://a.swirve.com/data[/HTML]
My problem is I know nothing about PHP.
The basics of what I am trying to do is scan the file, insert into a mysql database.
Right now there is a whole sets worth of data. But when the next set starts there wont be that many files, or same file names used. The one thing that stays the same is the next to last file is the current hour of news. I am hoping to scan the txt files once every 5 mins. Any help would be appreciated.
Feb 26 '07 #1
1 1110
[PHP]<?php
$filename = "personal.txt";
$data = file( $filename );
foreach( $data as $jai )
]
{ [/PHP]

Thats what I have so far to open the txt file. Thou I not sure how to get that open the 2nd from the bottom file.

I got some help with inserting into mysql database

[PHP]
$jaiql = mysql_query("INSERT msql_table VALUES ('', '{$jai[0]}', '{$jait[3]}', '{$jait[7]}', '{$jai[1]}', '{$jai[2]}', '{$jai[3]}', '{$jai[4]}', '{$jai[5]}', '{$jai[6]}', '{$jai[7]}', '{$jai[8]}')");

print("$jai[0]--$jait[3]--$jai... -- $jai[4] -- $jai[5] - $jai[6] - $jai[7] - $jai[8]");
[/PHP]
Feb 26 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

6
by: Kevin Ingram | last post by:
Ok, this is probably a silly question but I just keep hitting a brick wall here. I usually develop my sites entirely in ASP and use a database for data storage, works great for me. I also...
2
by: Fred | last post by:
Hi, I am parsing a small xml document and the parseing goes 'all funny' when parsing this element: <useragent>Mozilla/4.61 (WinNT; I)</useragent> I've created a subclass of...
2
by: An S. | last post by:
I have created a little "update" system, that tells when a update from nvidia is released, currently it tells it from a "simple" protocol "S2P", i have been told that XML, is much easier, for the...
6
by: Brian Henry | last post by:
How would you parse this type of file into an array? "Test","Help, data","hello there, this text has commas","commas seperate data, and in quotes they dont" where the double quotes are the...
1
by: svijay | last post by:
hi I have got a strange problem. May I know any solution for this. Here is the detailed description about the problem We have got a mainframe system and also production and development...
4
by: Andyza | last post by:
I'm using FileSystemObject to open and write to a tab delimited text file. First, I connect to a database and select some data. Then I create the text file and insert each record in the text...
4
by: guy | last post by:
I have a large number of html file (10,000+) and need to programmatical modify them on a regular basis. How can I determine the textual data that is present, ignoring tags etc so if i have a...
13
by: =?Utf-8?B?S2VzdGZpZWxk?= | last post by:
Hi Our company has a .Net web service that, when called via asp.net web pages across our network works 100%! The problem is that when we try and call the web service from a remote machine, one...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.