Archive for the 'Tricks' category

Scale website into iframe. HTML

Jun 21 2013 Published by under HTML&CSS, Tricks

Website thumbnail/iframe scale integration into another website.

Building a modern website directory requires besides of each website description integration of its thumbnail/scaled iframe.

1. One of the best thumbnail solutions is phantom JS project with its screen capture ability.
The only requirement to this project is a dedicated server with ssh root access.

2. The CSS3+HTML iframe scaling solution

    width: 448px; /* scaled website screen width */
    height: 358px; /* scaled website screen height */
    padding: 0;
    overflow: hidden;
  width: 1280px; /* website screen width */
  height: 1024px; /* Website screen height */
  border: 0;
  /* iframe zoom out. Cross browser solution. Full size - 1.0; Half size - 0.5 */
  -ms-zoom: 0.35;
  -transform: scale(0.35);
  -moz-transform: scale(0.35);
  -moz-transform-origin: 0 0;
  -o-transform: scale(0.35);
  -o-transform-origin: 0 0;
  -webkit-transform: scale(0.35);
  -webkit-transform-origin: 0 0;
<p>Content before iframe</p>
<div id="scaled">
  <iframe id="scframe" src=""></iframe>
<p>Content after iframe</p>

3. Just to mention JavaScript+HTML iframe website re-size by squeezeFrame.js and Wookmark jQuery website integration and resize. jQuery solution can be integrated into any container.

One response so far

Anonymous Internet Browsing. Myth or Reality.

Apr 05 2013 Published by under Misc, Tricks

We hear here and there Keep your information private, use proxy servers and you will never be detected.


A series of questions appear around “proxy mystery”:

  • Is information about your IP address hidden.
  • Is information about your browser hidden.
  • Is information about your computer hidden.


If you can easily hide information, can you simulate another user or another browser by changing the IP addresses and browser headers:

  • Can you change the IP address.
  • Can you simulate a browser.
  • Can you simulate a real visitor using proxy servers.

Continue Reading »

No responses yet

Backup MySQL Periodically. DB Restore. MySQL Table Restore

Jan 28 2013 Published by under Linux&Administration, Tricks

Using many MyISAM tables into MySQL DB I have faced the following problem:
the DB frequently crash while phpmyadmin and mysql table repair tools do not help on fixing tables.

Continue Reading »

2 responses so far

Cpanel include PEAR Library. Configure Path

Oct 14 2012 Published by under PHP & MySQL, Tricks

I have recently faced a problem, a website of mine was using PEAR DB.php library.
On a linux server without WHM or Cpanel it’s not a problem (at least for me) to configure paths and include PEAR libraries into php scripts just by name:


For cpanel based servers this include won’t work unltil you install your PEAR lilbraries and tell your local php configuration where the PEAR library is.

Continue Reading »

No responses yet

PHP. Protect File From Unauthorized Access

Oct 12 2012 Published by under PHP & MySQL, Tricks

Selling downloadable products you perhaps faced a problem: Unauthorized download.
You upload a file, sell it several times, then notice that your file is being accessed by much more people than it was expected to.

As a solution you can send file through email, but in nowadays many people expect instant download, so refunds will start bothering you.

In fact there is a rather simple php solution allowing downloads to authorized people only.

Continue Reading »

No responses yet

PHP. PDF File Download

Oct 12 2012 Published by under PHP & MySQL, Tricks

You have a pdf file with some informative info to share with your website users.

HTML Anchor, PDF File Download

Link your .pdf file into html code:

<a href="path_to_file/filename">download my file</a>

path_to_pdf_file – pdf file URL or relative path;
filename – your pdf file to download;

How does this work? Say your file is pdf, text, word, excel format… User’s browser automatically detects file type and display the file content to your users.
Now, to save this file they should click the right mouse button and select Save from the drop down menu.

But, what if you wish users download your file…

Continue Reading »

One response so far