Consider the following example: $date = strtotime(’23 Oct 2009 00:00:00’); $end = strtotime(’26 Oct 2009 00:00:00’); while($date < $end ) { echo date('Y-m-d',$date).PHP_EOL; $date += 86400; }
Kategorie: PHP
How to bypass IP validation with cURL script
Hi All, all we know the Tor network for anonymous surfing. In case you’ve never header about it – welcome to https://en.wikipedia.org/wiki/Tor_%28ano … network%29 So, can we use it in a php cURL script to bypass IP validation, country or even your own provider IP ban? Yes, we can. And here is the tutorial.
PHP debugging with xdebug , dbgp and notepad++ (windows)
Sometimes we don’t need an IDE to develop some simple projects. So many people use basic editors like notepad++ under windows. Surprisingly, they are able to debug your PHP scripts. With the help of plugins. Here is the tutorial.
Elance PHP5 code test (with answers)
Here is the list of problems with correct answers for Elance PHP5 Code Test: 1. recursive xml traversal: function ReadXml($xmlstr) { static $res = “; $xml = new SimpleXMLElement($xmlstr); if(count($xml->children())) { $res .= $xml->getName().PHP_EOL; foreach($xml->children() as $child) { ReadXml($child->asXML()); } } else { $res .= $xml->getName().‘: ‚.(string)$xml.PHP_EOL; } return $res; }
Zend_Dom_Query::loadHTML() problems with UTF-8
in order to prevent damaging charset while usnig Zend_Dom_Query please see the hack below. It happens that you experience wrong characters even if the document is UTF-8 and you specified this encoding when you creted your Zend_Dom_Query instance. The problem is in Zend_Dom_Query::queryXpath() method on line $domDoc->loadHTML($document);