This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| varnishadm | |
| vcl.load reload01 /usr/local/etc/varnish/default.vcl | |
| vcl.use reload01 | |
| varnishadm "ban.url ." # Matches all URLs | |
| varnishadm "ban req.http.host == opensourcehacker.com" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function validateEmail(email) { | |
| var re = /^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i; | |
| return re.test(email); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| function checkStock($url,$sku,$size, $nick = null){ | |
| $content = file_get_contents($url); | |
| $find = $sku.'":["<span class'; | |
| $start = strpos($content,$find); | |
| $end = strpos($content,"]]",$start); | |
| $substr = substr($content,$start,$end-$start); | |
| if (strpos($substr,$size) !== false){ |
NewerOlder