Tuesday, February 05, 2013

Generate PDFs Dynamically With PHP



This following code was used to generate PDFs dynamically. For example newpdffile.pdf just a new empty PDFs file. In pdfgenrate.php file , what ever you want in your PDFs just implement that in the php file dynamically.

Now you can run the following code , the PDFs generate dynamically and you will get the generated PDFs at the same path. 

function GetImageFromUrl($link)
{
$ch = curl_init();
curl_setopt($ch, CURLOPT_POST, 0);
curl_setopt($ch,CURLOPT_URL,$link);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$result=curl_exec($ch);
curl_close($ch);
return $result; 
}
       
 $filePath = $_SERVER['DOCUMENT_ROOT']."/yoursite/newpdffile.pdf";
$pathurl = "http://www.pdfmyurl.com/?url=http://localhost/yoursite/pdfgenrate.php";
$sourcecode=GetImageFromUrl($pathurl);
$savefile = fopen($filePath, 'w');
fwrite($savefile, $sourcecode);
fclose($savefile);

Cheers and thanks to pdfmyurl.com .

Friday, February 01, 2013

Facebook fan page in popup .


Please Use this code for facebook fan page using jquery ui dialog box.

we have using jquery cdn path for css and js files.

suppose you need more infomartion please go to this link http://jqueryui.com/dialog/

we are special thanks To Jquery. visit http://www.jquery.com/ 


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Facebook Fan Page</title>
    <link href="http://code.jquery.com/ui/1.10.0/themes/base/jquery-ui.css" rel="stylesheet">
    <script src="http://code.jquery.com/jquery-1.9.0.js"></script>
    <script src="http://code.jquery.com/ui/1.10.0/jquery-ui.js"></script>
 <script>
$(function() {
    $( "#fbpopup" ).dialog({
        width  : "570",
        height : "300",
        draggable : false
    });
});
</script>
</head>

<body>

<div id="fbpopup" title="John Resig - creator and lead developer of the jQuery">
<iframe src="http://www.facebook.com/plugins/likebox.php?href=http%3A%2F%2Fwww.facebook.com%2Fpages%2FJohn-Resig%2F104140286288547%2F&amp;width=570&amp;colorscheme=light&amp;show_faces=true&amp;border_color&amp;stream=false&amp;header=false&amp;height=330" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:570px; height:330px;" allowTransparency="true"></iframe>
</div>
</body>
</html>
Output :