fackz


Member since 08/14/2008

35 snippets

30 profile views

1 Comment(s) Posted

View their favorites

Profile

All time reputation: 443

Achievement

first submission:submitting first snipplet popular snippet:having a snipplet with 20 favorites

fackz's Recent Snippets



« Prev 1 2
  1. FAV

    Detect and convert utf-8 on string

    I can't say I can rely on mb_detect_encoding(). Had some freaky false positives a while back. The following code will detect when you need to enconde or decode it.
    PHP saved by 1 person 13 views posted 4 years ago fackz
  2. FAV

    Function to Auto Convert URL into Clickable Hyperlink (Anchor Tag)

    In wordpress, if you want to auto convert all URLs in your string into clickable hyperlinks, you can actually do it using the built-in function make_clickable(). If you need to do that outside of wordpress, you can use the same function. Example...
    PHP saved by 18 people 22 views posted 6 years ago fackz
  3. FAV

    How to Remove Directories Recursively with PHP - updated method

    This function removes a directory and its contents. Use with careful, no undo!
    PHP saved by 1 person 10 views posted 7 years ago fackz
  4. FAV

    vertical horizontal centered div

    Here's a simple way to get your div always on center in any screen size. margins should be half of width and height.
    CSS saved by 2 people 12 views posted 7 years ago fackz
  5. FAV

    Hide your e-mail address using PHP

    usage: <?php>
    PHP saved by 1 person 12 views posted 8 years ago fackz
  6. FAV

    How to Find Tomorrow, Next Month, or Next Year using PHP

    PHP saved by 2 people 8 views posted 8 years ago fackz
  7. FAV

    gets the data from a URL

    PHP saved by 4 people 5 views posted 9 years ago fackz
  8. FAV

    PHP script to make a backup copy of a MySQL table

    The script below connects to a MySQL database server on "localhost" using the login name "test" and password "123456" and then connects to the database "test". It then copies the table structure and data from the table "products" to a new table "prod...
    PHP saved by 64 people 18 views posted 9 years ago fackz
  9. FAV

    file upload with filetype and filesize checks

    PHP saved by 2 people 9 views posted 9 years ago fackz
  10. FAV

    Delete temporary files

    This example shows how to delete specific files after a given time span. This works good for cleaning cached files.
    PHP saved by 1 person 7 views posted 9 years ago fackz
  11. FAV

    Function to convert dates to and from Mysql

    PHP saved by 16 people 7 views posted 9 years ago fackz
  12. FAV

    php hide email function

    PHP encrypts your E-mail address and generates the javascript that decrypts it. Most bots and spiders can't execute javascript and that is what makes this work.
    PHP saved by 12 people 15 views posted 10 years ago fackz
  13. FAV

    MySql script to find invalid email addresses

    MySQL saved by 4 people 4 views posted 10 years ago fackz
  14. FAV

    Hide email address from web crawlers

    An easy way to hide your email from spam bots.
    JavaScript saved by 16 people 10 views posted 10 years ago fackz
  15. FAV

    get a list of files ordered by upload time

    This is another way to get a list of files ordered by upload time.
    PHP saved by 4 people 9 views posted 10 years ago fackz
  16. FAV

    image preloader

    JavaScript saved by 2 people 3 views posted 10 years ago fackz
  17. FAV

    Import data from TXT file to Mysql

    This piece of code will store each line of a txt file into a mysql database
    PHP saved by 18 people 17 views posted 10 years ago fackz
  18. FAV

    deleting a folder with php

    PHP saved by 3 people 10 views posted 10 years ago fackz
  19. FAV

    count files in a given dir

    count files in a given dir
    PHP saved by 2 people 5 views posted 10 years ago fackz
  20. FAV

    Unzip file using PHP

    A few days ago i was looking for a script witch one will help me to unzip a file using PHP . There is 2 different ways to do it.One just execute a commend to unzip the file in the shell using PHP and another one is using library functions
    PHP saved by 8 people 9 views posted 10 years ago fackz
  21. FAV

    php file upload

    PHP saved by 3 people 6 views posted 10 years ago fackz
  22. FAV

    Useful regex functions

    PHP saved by 16 people 40 views posted 10 years ago fackz
  23. FAV

    Gets the main url fo http_reffer

    PHP saved by 1 person 6 views posted 10 years ago fackz
  24. FAV

    How to e-mail yourself an automatic backup of your MySQL database table with PHP

    PHP saved by 99 people 30 views posted 10 years ago fackz
  25. FAV

    Php Server module Report

    A basic PHP script that I simply FTP to the server and use to evaluate extensions on the server. I simply supply the extensions I require and the script does the rest of the work.
    PHP saved by 1 person 3 views posted 10 years ago fackz
  26. FAV

    Script to delete files in a directory (X days old)

    delete all files in a directory that are more than 7 days old.
    PHP saved by 4 people 8 views posted 10 years ago fackz
  27. FAV

    list all files in a directory

    The .jpg extension can be changed to any extension. So if you want to pull out only .txt files, you just need to replace the .jpg with .txt. If you want to list ALL files, just remove the condition.
    PHP saved by 4 people 11 views posted 10 years ago fackz
  28. FAV

    Export data to CSV

    The best part about this script is that any table you put in the query on line 14 will be the headers and data in the CSV. No need to hand type out all the table headers unless you want to comment that section out and put in your own. So if you have...
    PHP saved by 2 people 10 views posted 10 years ago fackz
  29. FAV

    Backup Your MySQL Database Using PHP

    Database backup function that you can call whenever you want — including nightly CRONs.
    PHP saved by 54 people 16 views posted 10 years ago fackz
  30. FAV

    Formatar Data e Hora Portugues

    PHP saved by 1 person 4 views posted 10 years ago fackz
« Prev 1 2