If you have been programming websites long enough you would know that user input is first think to worry about when thinking about security. It’s really hard to decide what data is acceptable, especially when user has permission to insert HTML content through form.
For example, if you are developing CMS you need to make sure [...]
Archive for the ‘Websites’ category
HTML filtering and XSS protection
Debugging with FirePHP and Firebug
One may debug his application with print(”) statements all other the place or alert(”) for JavaScript. Luckily some years ago Firebug extension for Firefox was introduced, which introduced (?) console. Console works absolutely the same as in Linux and can be used not only to execute commands, but receive information from various sources.
To start with, [...]
Scraping login requiring websites with cURL
Scraping websites with XPath is very easy (read here), but how to scrape user’s friends list from social website if it can be viewed only when user is logged in?
What we need to do is to implement algorithm, which posts login and password fields to website login form and uses the same PHPSESSID id for [...]
PayPal payment with encryption
Recently phpfour.com posted very interesting library for payment gateways. In my situation, PayPal is only used to pay for orders – cart and order setup is done in our shop, so I do not want to have additional problems with users changing orders numbers, amount to be paid, etc. Today I’m going to show how [...]
Web scraping with PHP and XPath
When I was writing about how I use web scraping, I was still hadn’t tried using Xpath (shame on me). sssscripting blog responded to my article with very good and rich post about all sorts of different techniques for scraping (with Ruby examples) and after reading this post in Kore Nordmann blog I finally decided [...]
Correct headers for dynamically generated content
Static images have correct headers – Apache sends them by default. Different story is with all dynamic generating content – if you don’t send correct headers user’s browser will load it every time. It’s not always good, because generated thumbnails doesn’t change every time and should be cached in browser’s cache. If you want to [...]
Web scraping – easy way to monitor market
Sssssssscripting blog yesterday wrote about writing your own web crawler (in Ruby) and I immediately remember that I have done similar projects in past. Only difference is, I had developed web scrappers which were used to monitor e-commerce websites market. Believe me, when you run online shop, having ability to look at rivals prices in [...]
Easy javascript packing with PHP
“JavaScript packing” is method for reducing JavaScript files size by removing all unnecessary data (obfuscating) and compressing it’s contents. Most popular is Dean Edward’s packer, which transforms JavaScripts into something like this:
eval(function(p,a,c,k,e,r){…
To start with, it’s very easy to have dynamically packed files (no one wants to pack them by hand, packed versions are only useful [...]







