Session/Cookie alone does not secure your web application – CSRF
Posted by Sajith M.R in general on 13. Nov, 2009 | 0 Comments
Guess what will happen if you add an image like below in your html page:
<img src=”http://mail.google.com/mail/?logout&hl=en” />
It does not appear in page, but your google account in another window or another tab will get logoff. Now an external website could logout you from your gmail or orkut.
IF you coded your website to delete a photo [...]
Wordpress post via email
Posted by Sajith M.R in php on 18. Aug, 2008 | 9 Comments
If you know this feature already , skip this article. But i have to ask a single question at the end of this section .
For wordpress version less than 2.3 , Go to Options > writing, and for greater than 2.3, Go to settings > writing
What you have to do is create an email account [...]
PHP post without curl
Posted by Sajith M.R in Downloads, php, php source code on 04. Apr, 2008 | 8 Comments
You can simulate the post method using php without the help of curl library.
download full source code:
See the code below:
function do_post_request($url, $data, $optional_headers = null) {
$params = array(’http’ =>; array(’method’ =>; ‘POST’,
‘content’ =>; $data
));
if ($optional_headers !== null) {
$params['http']['header'] = $optional_headers;
}
$ctx = stream_context_create($params);
$fp = @fopen($url, ‘rb’, false, $ctx);
if (!$fp) {
throw new Exception(”Problem with $url, $php_errormsg”);
}
$response = [...]


