Wednesday, January 9, 2013

Check Domain Name Using Php Script

We can check our DNS record to verify the existence of a domain name or not. We can see if facebook.com is there in DNS record by using checkdnsrr function. This function returns True if available and returns False if not available.The type can be A, MX, NS, PTR,SOA, AAAA, CNAME, SRV,A6 NAPTR, TXT or ANY.




Here is the simple code to check DNS records.

$domain="facebook.com";
if(!checkdnsrr($domain,'MX')) {
echo "Not there ";
}else {
echo " It is there "; }
 
//out put: It is there 

 

Create PDF File using Dompdf

The best option for creating pdf file or report,I suggest only Dompdf.The Dompdf is fullfill all requirement.In Dompdf you have to create simple pdf file,dynamic data file,generate database related pdf file.dompdf is an HTML to PDF converter. At its heart, dompdf is (mostly) CSS 2.1 compliant HTML layout and rendering engine written in PHP.dompdf is an HTML to PDF converter.


 
Download Dompdf :
  1. Link 1
  2. Link 2
  3. Link 3
Example For Create PDF :
$html = ("<html>");
 $html .= ("<head>");
 $html .= ("<style>");
 $html .= ("</style>");
 $html .= ("</head>");
 $html .= ("<body>");

$html.=("<table width='500' border='1' cellspacing='1' cellpadding='1'>\n");
$html .= ("<tr>");
$html .= ("<td>hello</td>");
$html .= ("<td>welcome</td>");
$html .= ("</tr>");
 $html .= ("</table>");
 $html .= ("<h2>Generated PDF</h2>\n");
 $html .= ("<p>date_today</p>\n");
 $html .= ("</div>");

 $html .= ("<p>$table->COMMENT</p>\n");

 $html .= ("</body>");
 $html .= ("</html>");

 function render($html,$filename)
 {
  require_once("../dompdf_config.inc.php");
  $dompdf = new DOMPDF();
  $dompdf->load_html($html);
  $dompdf->set_paper("a4", "landscape" );
  $dompdf->render();
  $dompdf->stream("$filename.pdf");
 }

 $filename = ("GeneratedPDF");

 render($html,$filename);
}
 

Hide URL From Browser Using Curl Script in Php

First you have to intialise the curl function using ” curl_init()  “.
then set url into curl function like  “curl_setopt($my_curl, CURLOPT_URL, “http://tutjunction.com/”)” . 
then set header false by ” CURLOPT_HEADER “.  
then afer execute the curl and close the curl connection.

Example : 

$my_curl = curl_init();// cURL resource

// WE will add options to our curl
curl_setopt($my_curl, CURLOPT_URL, "http://twitter.com/");
curl_setopt($my_curl, CURLOPT_HEADER, 0);

curl_exec($my_curl); //execute curl function now and display
curl_close($my_curl); // close the curl connection

Create Ms Word File Using Php Script

Here use simple php file function for creating ms word or doc report dynamic.Use following code. Step 1:  

$fp = fopen("Report.doc", 'w+');

The fopen() function is used to open files in PHP.
The first parameter of this function contains the name of the file to be opened and the second parameter specifies in which mode the file should be opened:

Modes Description
r Read only. Starts at the beginning of the file
r+ Read/Write. Starts at the beginning of the file
w Write only. Opens and clears the contents of file; or creates a new file if it doesn’t exist
w+ Read/Write. Opens and clears the contents of file; or creates a new file if it doesn’t exist
a Append. Opens and writes to the end of the file or creates a new file if it doesn’t exist
a+ Read/Append. Preserves file content by writing to the end of the file
x Write only. Creates a new file. Returns FALSE and an error if file already exists
x+ Read/Write. Creates a new file. Returns FALSE and an error if file already exists.

$str="welcome";  
add file content to $str.
fwrite($fp, $str);
fclose($fp); 
write data into file and finally close the file.
Final Code : 
$fp = fopen("reports/Assign_Report.doc", 'w+');
$str ='welcome';
fwrite($fp, $str);
fclose($fp);   
 

Saturday, December 1, 2012

Free Download Max Player

 

Media Player Max

Release : 1.21.0.0.3
Language :
Media Player MaxEnglish
System :
Windows 95
Windows 98
Windows 2000
Windows XP
Windows Vista
License : Freeware 

Media Player Max is a powerful media player that can handle any type media support including DVDs and VCDs. Max Media Player will read a wide range of audio/video formats such as WAV, WMA, MKA, m4a, mp3, mp4, ogg, aac, 3g2, wmv, asf, avi, mpg, mp2, mpe, mpeg, mp4, m4v, ogm, mov, hdmov, 3GP, 3GPP, 3G2, FLV, and more. It allows you to customize the playback window (in thumbnail mode or full screen), manage playlist, navigate easily in your collections of media files, choose between 3 different play modes (normal, loop, random), increase/slow down the playback speed, pause, etc.. Max Media Player is free software compatible with most of the Windows OS platforms.Internet business


Download  link : Link