Jump to content

kevin87

New Members
  • Posts

    9
  • Joined

  • Last visited

kevin87's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. well now after I wrote all of that I think maybe I should just do a copy of the file on my linux server to a different file at 8PM every day. That would probably be a whole lot easy then doing something crazy with php.
  2. Yeah sorry it is a little confusing maybe I can ask it a little better. Lets say my text.txt file is changing constantly and I have users visiting my page consistently I only want my $html variable to get the contents from text.txt at 8PM. The reason for this is because the file is changing all the time and I want to get the info exactly at 8PM. Does that make more sense?
  3. Hi Everyone, I have an interesting question that I have had a hard time searching for so I thought I would throw it on here to see if you guys could help. I am currently using the following to load a file to $html using $html = file_get_contents("text.txt"); Is there a way to have this file load at a certain time of the day. For example, it loads the file at 8PM every day? Thanks, Kevin
  4. Also a second question. Is there a way to print only line 75 to 100 when using $html = file_get_contents("http://www.airnav.com/airport/KARR"); Thanks, Kevin
  5. Thanks a lot for the response. I ran this code and had a little trouble, but I think it is getting closer. Maybe I can understand it if there is less data. What if I just wanted to grab this string and print it? <A name="ops"></A><H3>Airport Operations</H3>
  6. Hi everyone, I need some help pulling data from a remote site. Currently I am using the following code which works and pulls all of the data. The next step is where I am a little lost. $str = file_get_contents("http://www.airnav.com/airport/KARR"); I would like to only pull the following data from the remote site. <A name="ops"></A><H3>Airport Operations</H3> <TABLE cellpadding=0 cellspacing=0 border=0> <TR><TD nowrap valign=top align=right>Airport use: </TD><TD valign=top>Open to the public</TD></TR> <TR><TD nowrap align=right>Activation date: </TD><TD>04/1966</TD></TR> <TR><TD nowrap valign=top align=right>Sectional chart: </TD><TD valign=top><A href="/sectionals">CHICAGO</A></TD></TR> <TR><TD nowrap align=right>Control tower: </TD><TD>yes</TD></TR> Can anyone help me out with this? Thanks, Kevin
  7. Awesome thank you so much! that did the trick. Kevin
  8. Hi everyone, I am having a little trouble understanding what is going on. Below is the code I am working with. The data is not printing on the screen. What the heck am I doing wrong? Any input is appreciated. Thanks, Kevin <?php $xmlMetar=simplexml_load_file("http://aviationweather.gov/adds/dataserver_current/httpparam?dataSource=metars&requestType=retrieve&format=xml&stationString=KARR&hoursBeforeNow=1"); $metarKARR=$xmlMetar->METAR->raw_text; echo $metarKARR; ?>
×
×
  • 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.