Category Archives: PHP

Hack – programming language for HHVM – seamlessly PHP

Today we’re releasing Hack, a programming language we developed for HHVM that interoperates seamlessly with PHP. Hack reconciles the fast development cycle of PHP with the discipline provided by static typing, while adding many features commonly found in other modern programming languages.

We have deployed Hack at Facebook and it has been a great success. Over the last year, we have migrated nearly our entire PHP codebase to Hack, thanks to both organic adoption and a number of homegrown refactoring tools.

We’re also proud to release an open source version of Hack to the public http://www.hacklang.org/ as part of our HHVM runtime platform, which will now support both Hack and PHP.

 

 

Top 5 security flaws within websites and how to prevent them

So we’re now into 2014 and websites are starting to become way more advanced by implementing new technologies such as AJAX, fancy web forms and even web sockets. However, little do webmaster’s realise that they’re opening a space for huge security flaws within their websites / web applications / web services for malicious hackers to take advantage of.

Read more at http://joel-murphy.com/top-5-security-flaws-within-websites-and-how-to-prevent-them/

 

Setting the http referer with PHP CURL – webscrapping

This is how we simply trick the server with a fake referer!
On webscrapping we can try to hide or make them think that we aren’t performing webscrapping on them!

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'http://www.webscrappingthis.com/');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_REFERER, 'http://www.linkedfrom.com/');
$html = curl_exec($ch);