Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
Well, connect by IP. If it's not grey, then everything will work.
You need a white IP address on the device you are connecting to, or you need to forward ports from a device that has a white address.
I summarize. The remote router must have a white address. On this router, we configure port forwarding to the address of the desired server. Connects by dns name, if dns is configured. Or white address. default rdp port 3389
If you only have jQuery - you need to somehow save the time of the first publication. Either on the server (which is the easiest), or if you receive data via ajax - save the date of each new news in cookies.
And then, when you display news in a loop, check the date and compare it with the current one. Checking is best done in unixtime, for example:
...
var savedDate = cookies.get("newId");//получили сохраненную ранее дату отдельной новости
var curDate = new Date();//получили текущую дату
if(+savedDate + 60*60*24* 1000 < +curDate) {//60c * 60 мин * 24ч * 1000мс
//новость пора убирать
}
...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question