Jump to content

Traces

New Members
  • Posts

    3
  • Joined

  • Last visited

    Never

Everything posted by Traces

  1. The only problem is it still doesn't tell me whether or not the log file was last updated a day or even a week ago for example.  Also, if I am reading that right that would still give me issues as 2300 hours turned into seconds gives me a higher number than 1000 hours still. Thinking about it some more though I just realized that I could tell it that if the first number (23:12:01) in my example is larger than the second entry (01:20:56) to simply count backwards...  I am going to test this theory and see where that gets me. I still don't see how I am going to get over the issue of it "finding its bearings" as it will never (seemingly) be able to tell the difference between 2300 hours of last year to today without something extra to go off of. Thanks Timbo.
  2. I am trying to compare two timestamps in a log file to calculate the time between them, however the timestamps in the log file are in military time and don't include actual dates or anything else.  The problem is that if the log file isn't written to every single hour (out of my control when it will be) or the system is shut off for a while and turned back on I can't compare them if it falls between 2300 hours and 0100 hours for example or 2300 hours one day and 2300 hours the next.  The php file will be checking them at random as well. [code][23:12:01] Entry [01:20:56] Entry[/code] Is there even a solution to this?  It seems unix timestamps is the solution in most of the search results I saw but I don't see how it will work for me here.
  3. This is probably a pretty odd question but hopefully an easy one.  Don't worry, I don't want anyone to write a script for me or anything like that, I have a friend that does php and can do all the dirty work, we are just stuck on a couple of things. Basically this is what I am trying to do...  I have a site hosted by godaddy with php, a program on my computer is outputting a html file every 5 minutes with data, the data is uploaded via ftp every 5 minutes automatically to the website.  What I want to do is have a RSS feed dynamically created with parsed information from the data file.  So after some calculations by the php script I get a concise output which makes my life a little easier since I don't have to do it by hand.  Why an RSS exactly?  I *always* have my personalized google page open which is filled with RSS feeds.  Basically all I would have to do is glance at the RSS feed and have everything done for me as I kept an eye on it.  For the clarification I would just be using the RSS feed as a way to display the dynamic results from the data. So: raw data > data.html every 5 minutes > data.html uploaded to website every 5 minutes > php parses and works it's magic every 5 minutes > php creates a dynamic rss feed with parsed info every 5 minutes Here is the problem though.  How do sites keep their xml files dynamically updated?  I know it can be done by hand of course but as you can see that wouldn't work for me.  Making php do this is easy, once.  But making it automagically update the xml file?  I did some research (I am not a programmer) and crontab is what I want but godaddy doesn't support this for shared hosting plans.  I could always setup a unix box here locally and have it upload the finalized xml file, which would seem like the better route here but that is quite a bit of work for me as I am not familiar with anything other than windows.  Honestly I *really* don't want to go that route.  Is there another way of doing this by using PHP?  Do the programming gurus think I am doing this ass backwards and have a more elegant solution? I know you guys get a -lot- of requests for help but like I said before I don't need anyone to write a script, I am just at an impass.  If you guys can clarify the path for me google and my friends php skills can take over from there.  Thanks guys. Oh and I don't know if this helps but the server API is CGI/FastCGI
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.