Parsing a local file

This is a discussion on Parsing a local file within the PHP General forums, part of the PHP Programming Forums category; I am trying to build script that will parse a file on the user's computer. There are 2 things ...


Go Back   Usenet Forums > PHP Programming Forums > PHP General

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 07-30-2003
Jason D. Williard
 
Posts: n/a
Default Parsing a local file

I am trying to build script that will parse a file on the user's computer.
There are 2 things that I am not quite sure about.

1) How to read a file on the user's computer, and not on the server.

2) How to parse a line similar to the one below:

"7/29/2003" , "Report Title" , "Page" , "Agent Name" , "5200" , "30" ,
"3:30" , "" , "" , ""

Now, in this line, there are items that I would like to discard. As well,
there are items between the "s that I would like the parse further. Below
is how I would like it parsed

"$month/$day/$year" , "DISCARD" , "DISCARD" , "DISCARD" , "$agentid" ,
"$calls_taken" , "$avg_call_time" , "DISCARD" , "DISCARD" , "DISCARD"


Any help would be appreciated.

Thanks,
Jason






Reply With Quote
  #2 (permalink)  
Old 07-30-2003
Dvdmandt
 
Posts: n/a
Default Re: Parsing a local file

Also, it's a remote file you are trying to parse, not a local...
local=server, remote=user... Like John linked, you must upload it... Can't
do it other ways...

--
// DvDmanDT
MSN: dvdmandt@hotmail.com
Mail: dvdmandt@telia.com
"Jason D. Williard" <jason@jasondubya.com> skrev i meddelandet
news:20030730010840.3407.qmail@pb1.pair.com...
> I am trying to build script that will parse a file on the user's computer.
> There are 2 things that I am not quite sure about.
>
> 1) How to read a file on the user's computer, and not on the server.
>
> 2) How to parse a line similar to the one below:
>
> "7/29/2003" , "Report Title" , "Page" , "Agent Name" , "5200" , "30" ,
> "3:30" , "" , "" , ""
>
> Now, in this line, there are items that I would like to discard. As well,
> there are items between the "s that I would like the parse further. Below
> is how I would like it parsed
>
> "$month/$day/$year" , "DISCARD" , "DISCARD" , "DISCARD" , "$agentid" ,
> "$calls_taken" , "$avg_call_time" , "DISCARD" , "DISCARD" , "DISCARD"
>
>
> Any help would be appreciated.
>
> Thanks,
> Jason
>
>
>
>
>
>



Reply With Quote
  #3 (permalink)  
Old 07-30-2003
Curt Zirzow
 
Posts: n/a
Default Re: [PHP] Re: Parsing a local file

* Thus wrote DvDmanDT (dvdmandt@telia.com):
> Also, it's a remote file you are trying to parse, not a local...
> local=server, remote=user... Like John linked, you must upload it... Can't
> do it other ways...


I suppose in this case with local and remote defined this way it
should be download instead of upload :)

Curt
--
"I used to think I was indecisive, but now I'm not so sure."
Reply With Quote
  #4 (permalink)  
Old 07-30-2003
Dvdmandt
 
Posts: n/a
Default Re: [PHP] Re: Parsing a local file

lol, yeah, guess so... Although, when you talk about these things, do you
say you must download a file from the client? Or that you must open the
remote logfile in your script? Damn, this is getting screwy...

--
// DvDmanDT
MSN: dvdmandt@hotmail.com
Mail: dvdmandt@telia.com
"Curt Zirzow" <curt@zirzow.dyndns.org> skrev i meddelandet
news:20030730025348.GS10509@bagend.shire...
> * Thus wrote DvDmanDT (dvdmandt@telia.com):
> > Also, it's a remote file you are trying to parse, not a local...
> > local=server, remote=user... Like John linked, you must upload it...

Can't
> > do it other ways...

>
> I suppose in this case with local and remote defined this way it
> should be download instead of upload :)
>
> Curt
> --
> "I used to think I was indecisive, but now I'm not so sure."



Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 06:13 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0