Showing posts with label scripts. Show all posts
Showing posts with label scripts. Show all posts

Download header for image

Thursday, July 19, 2012













Below code will download image from the link stored in $main_url.This code uses curl library.
<?php
$main_url='http://24.224.243.223/axis-cgi/jpg/image.cgi?resolution=640x480&camera=1&compression=25';
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL,$main_url);
curl_setopt($curl,CURLOPT_POST,1);
curl_setopt($curl,CURLOPT_POSTFIELDS,$requr);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
$result = curl_exec ($curl);
$err = curl_error($curl);
curl_close ($curl);
header('Content-type:image/jpeg');
header('Content-Disposition:attachment;filename="cam.jpg"');
echo $result;
?>


Happy coding :)
Continue Reading...

Fancy box close after login

Saturday, November 26, 2011

One of my friend used fancybox for login.And he could not close fancy box after login.So i tried to help him and guess what i used this code to its completion.

parent.$.fancybox.close(); parent.location.reload(true);exit();
Continue Reading...