Decrypt \x3d


Hits: 1584  

How to decrypt string html like below:

$html=html_entity_decode(urldecode(str_replace(‘\x’, ‘%’, $html)),ENT_QUOTES, “UTF-8”);

MP3 file download link

$mp3_dlink = preg_replace(‘/ /i’, ‘%20’, $mp3_link);

Get popup center


Hits: 1340  

function get_popup_center(popurl)
{

var top = (screen.availHeight/2)-61;
var left = (screen.availWidth/2)-150;
var width = 300;
var height = 150;
//var popurl = ‘http://www.svnlabs.com’;

var oWin = popUp(popurl, top, left, width, height);

}

function popUp(URL, top, left, width, height)
{
day = new Date();
id = day.getTime();

eval(“page” + id + ” = window.open(‘”+URL+”‘, ‘” + id + “‘,’toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=”+width+”,
height=”+height+”,top=”+top+”,left=”+left+”‘);”);
return “page” + id;
}

focus password element from password to ********


Hits: 1247  

/**
*  <form>
*  <input type=”text” name=”password” value=”Password” onfocus=”get_password_focus(this)”>
*  </form>
*  This function can be used for focus password element from password to ********
*/

function password_focus(obj)
{
var newO=document.createElement(‘input’);
newO.setAttribute(‘type’,’password’);
newO.setAttribute(‘name’,obj.getAttribute(‘name’));
obj.parentNode.replaceChild(newO,obj);
newO.focus();
}

Get page size


Hits: 1281  

function get_page_size() {

var de = document.documentElement;
var w = window.innerWidth || self.innerWidth || (de&&de.clientWidth) || document.body.clientWidth;
var h = window.innerHeight || self.innerHeight || (de&&de.clientHeight) || document.body.clientHeight;
arrayPageSize = new Array(w,h);
return arrayPageSize;

}

Protect website folders by .htaccess


Hits: 1730  

<IfModule dir_module>
DirectoryIndex index.html index.php index.php4 index.php3 index.cgi index.pl index.htm index.shtml index.phtml
</IfModule>

<IfModule mod_rewrite.c>
RewriteEngine on

RewriteBase /

RewriteCond %{REQUEST_URI} !(css)
RewriteCond %{REQUEST_URI} !(js)
RewriteCond %{REQUEST_URI} !(images)
RewriteCond %{REQUEST_URI} !(videos)
RewriteCond %{REQUEST_URI} !(cache)

</IfModule>

Templates Search Made Easy


Hits: 1525  

Suppose you want to search joomla/wordpress templates and find the site for all these templates, here you have to navigate entire templates with all pages. This will waste your time and internet band width….
www.bestofjoomla.com
The best way to navigate all template in few seconds:

Google Image Search
Google Image Search
Google Search Results
Google Search Results

This will save your time and band width…..

Here on result page you can select your favorite template and browse that one inspite of navigating all www.bestofjoomla.com pages….

Happy Searching 🙂

pdftk – fedora – merge pdf files


Hits: 2296  

Pdftk allows to manipulate PDF easily and freely. It does not require Acrobat, and it runs on Windows, Linux, Mac OS X, FreeBSD and Solaris etc.

Features:

  • Merge PDF Documents
  • Split PDF Pages into a New Document
  • Rotate PDF Pages or Documents
  • Decrypt Input as Necessary (Password Required)
  • Encrypt Output as Desired
  • Fill PDF Forms with FDF Data or XFDF Data and/or Flatten Forms
  • Apply a Background Watermark or a Foreground Stamp
  • Report on PDF Metrics such as Metadata, Bookmarks, and Page Labels
  • Update PDF Metadata
  • Attach Files to PDF Pages or the PDF Document
  • Unpack PDF Attachments
  • Burst a PDF Document into Single Pages
  • Uncompress and Re-Compress Page Streams
  • Repair Corrupted PDF (Where Possible)

Install pdftk on fedora/linux:

# yum install pdftk
# which pdftk

Merge Two or More PDFs into a New Document
# pdftk 1.pdf 2.pdf 3.pdf cat output 123.pdf
Source: http://www.accesspdf.com/pdftk/

Resume Builder pdf2txt, word2txt


Hits: 1679  

Reading PDF Files

XPDF package includes “pdftotext.” You have to install XPDF/pdftotext then run the following PHP statement to get the PDF text:

$txtcontent = exec('/usr/local/bin/pdftotext svnlabs.pdf -');

Reading DOC Files

This package is called Antiword. Here’s the PHP code to grab the Word DOC content:

$txtcontent = exec('/usr/local/bin/antiword svnlabs.doc');

Publish HTML2PDF


Hits: 1776  

HTMLDOC converts HTML files and web pages into HTML, PostScript and PDF files suitable for on-line viewing and printing. HTMLDOC is used for anything that needs to be viewed or printed including on-line billing, books, financial statements, automated network configuration guides, mailing lists and labels, marketing flyers, quarterly reports, technical manuals, and users manuals. We can use HTMLDOC for all of documentation and reports, and it is the core of our PDF-o-matic demonstration page.

html2pdf
html2pdf

A limited-use open source version is also available at htmldoc.org.

Uses:
# htmldoc --webpage -f output.pdf filename.html ENTER

# htmldoc --book -f 12book.pdf 1book.html 2book.html --titlefile bookcover.jpg ENTER