Advertisement
darearkin

Untitled

Apr 2nd, 2013
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. local time_url = "http://www.worldtimeserver.com/current_time_in_US-CA.aspx" --Replace this
  2. local function getTime()
  3. local request = http.get(time_url)
  4. local time_content = request.readAll()
  5. request.close()
  6. local search_text = [[<div id="analog%-digital">.-<span class="font7">(.-)</span>]]
  7. local _,_, global_time = time_content:find(search_text)
  8. local global_time = global_time:gsub("%s", "")
  9. print(global_time)
  10. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement