0

How to grab time in a website in order to construct a webpage clock? (in PHP)

the intention is to clone a webpage and edit it, but get dinamic data from a page and work with

14th Nov 2018, 9:17 PM
Daniel Bandeira
Daniel Bandeira - avatar
5 Answers
+ 1
Ooh thats called web scraping, you need to send a http request to target webpage then parse the response, so you can get any information you'll need. More complicated the website is more work needs to be done to get the desired result And side note, its not always reliable once the target page change its html structure you'll need to rework your code to match them
15th Nov 2018, 3:16 AM
Taste
Taste - avatar
+ 2
want to clone a page? to go inspect code and download the files only js, css, html
14th Nov 2018, 9:41 PM
Matheus Batista
Matheus Batista - avatar
+ 1
JS new Date() or Date.now() is enough for get realtime user's time, in php use date() or time()
14th Nov 2018, 11:13 PM
Taste
Taste - avatar
0
I would like to get/use a dinamical data from a web page that doesn't belong to my domain. That this the behind idea. Creating a clock was a theme for examplification.
15th Nov 2018, 3:07 AM
Daniel Bandeira
Daniel Bandeira - avatar
0
Thank you a lot. Your remark at the ens of comment is so appreciable. ("web scraping...")
15th Nov 2018, 9:15 AM
Daniel Bandeira
Daniel Bandeira - avatar