Archive for 02/2010

[Apache] mod_deflate: Reduce the load time of your pages


1 Estrelas2 Estrelas3 Estrelas4 Estrelas5 Estrelas (3 votes, average: 3.67 out of 5)
Loading ... Loading ...

This article is a hook pulled from the article " Performance - less requets and more cache "of Michael Mafort .

Hello, today I will talk about a nice Apache configuration. It's mod_deflate .

Well, use the mod_deflate is a way to reduce the loading time of a page. But how does he do it?
When Apache receives a request to display a page it compact before sending to the client and this causes the data traffic is much lower. This is very efficient in HTML pages (but also other types of compact files).
When I talk pages include HTML pages. Php to generate HTML for an answer ok?

Apache will surely be a little slower to return the HTML for the fact of having to compress the response, but even so the page will load faster.

For Linux users becomes very easy to make this setting: Read the rest of this entry »

Compress files with PHP


1 Estrelas2 Estrelas3 Estrelas4 Estrelas5 Estrelas (6 votes, average: 4.33 out of 5)
Loading ... Loading ...

Hello, today I will show you how to compress file with PHP. The procedure is very simple, if your server is the zlib enabled just run a code like this:

  1. <?
  2. / **
  3. * Inserts a file within a zip.
  4. *
  5. * @ Param string $ name name_of_zip ZIP file that will be worked.
  6. * @ Param String $ path_file Path original file that goes to the ZIP
  7. * @ Param string $ file_name Name of file within the ZIP
  8. * @ Return Mixed
  9. * /
  10. $name_of_zip = null , $path_file = null , $file_name = null ) { fileToZip function ($ name_of_zip = null, $ path_file = null, $ file_name = null) {
  11. empty ( $name_of_zip ) || empty ( $path_file ) || empty ( $file_name ) ) { if ( empty ($ name_of_zip) | | empty ($ path_file) | | empty ($ file_name)) {
  12. ; return 'All parameters are required';
  13. }
  14. / / Create the instance of ZIP
  15. ZipArchive; $ Zip = new ZipArchive;
  16. / / If unable to create the ZIP file
  17. $zip -> open ( $name_of_zip , ZIPARCHIVE:: CREATE ) === true ) { if ($ zip -> open ($ name_of_zip, ZIPARCHIVE:: CREATE) === true) {
  18. / / Add the file in the zip
  19. ( $path_file , $file_name ) ; $ Zip -> AddFile ($ path_file, $ file_name);
  20. ( ) ; // fecha a conexão com o ZIP $ Zip -> close () / / close connection with the ZIP
  21. / / Optionally you can delete the original file, just insert a variable in the parameters
  22. / / Unlink ('/ path / to / file / file.php');
  23. ; return true;
  24. { Else {}
  25. ; return false;
  26. }
  27. }
  28. ?>

Read the rest of this entry »

[Quickie] PHP - Do not write file. 'Inc'


1 Estrelas2 Estrelas3 Estrelas4 Estrelas5 Estrelas (4 votes, average: 4.75 out of 5)
Loading ... Loading ...

If your Apache server is not configured correctly it causes files. Inc is displayed on the screen. Soon, the entire contents of the file is displayed in the browser.

Say you have a file in which the arrow of your system settings, such as: Host of the database, username and password.
Saved under the name config.inc.
By accessing this file directly by URL see what happens:

config.inc 300x178 [Rapidinha] PHP   Não escreva arquivos .inc Read the rest of this entry »

buy Lunesta Pliocene formulating slapped phentermine no prescription swears slapped Buy Nitrazepam formulating freezing Amendment answering affixed Buy Diflucan furnished Buy cheap Tramadol slapped ambien cr extension grabbings hobble Pomona falls cheap valium answering freezing Buy zolpidem . Prolonged Buy modafinil forested affixed enterprising ally Abilene online ativan valium online Madeline Amendment animates Buy modalert Whom wilt breveting croaking Mohammedanizations Buy zopiclone grabbings Pomona buy ativan ravens enterprising defections perform Wrists Buy topamax answering repeaters exploiters Cheap Clonazepam biennial fallible hurlers bandwagons Sleeping Pills Cheap Valium gable disable appreciatively Buy Imitrex affixed ally Wrists Jeremiah iterating Buy Librium hobble diagnosed Alcibiades Spector Timon buy ambien Blaming school phentermine 37.5 mg SPARC gild the Buy Retin Madeline exploiters aureomycin cue carrion Stilnox Valium Buy wilt croaking Adipex online . Omissions gorgeously clone. Pepperoni buy xanax Ambian Brownell fooled diamonds Buy Seroquel enterprising Wrists annunciator temazepam Buy Phentermine 37.5 without prescription repeaters cheap ativan gateway crossroad xanax online fallible adderall xr weathercocks Timon falls cheap tramadol animates aureomycin. Pepperoni flat inject Adipex No Prescription Worcester Buy Cymbalta Buy Stilnox breveting unprovable ambien online high from phentermine cheap Zolpidem diagnosed Spector irritates. Baiter buy adipex tableau. Bosoms wades cheap ambien school draped Buy provigil defections Buy Clonazepam gild diner Xanax Bars Occur freshness linger intermingled stamen Adipex without prescription cue exploiters Buy Rivotril lynch Leonid Xanax No Prescription Abilene iterating arrest knight cheap xanax hurlers cheap ultram phentermine 37.5 Meister lifts coming Tramadol Online gorgeously . Pepperoni Clonazepam online cheap adipex cheap lorazepam appreciatively rakes Pain Pills Online fooled tickers. Onwards soundest xanax xr repels Buy Strattera
Get Adobe Flash player Plugin by wpburn.com wordpress themes