Archive | Imprint | Privacy
19th March 2010
Nerd 2.0

Unzip with PHP

Who has not, lots of different archive formats zip, gz, bz, lzma, etc. are on the desktop no problem. When you create a Web application in PHP, the more complicated, so I got it exec () and 7-zip solved.

In the Annex, so a package with PHP - function to unzip and 7zip - Binary's for 32 / 64 - bit Linux and Windows systems.

Read more »

31st March 2008
Nerd 2.0

Text truncated, but HTML open?

Again it happened that an unclosed HTML tag has destroyed the excerpts from my layout, but in the network can indeed find a solution more quickly.

Here, then, a PHP code snippet of all open HTML tags closes. Although not a nice solution, but something better has occurred to me on the fast too.

 function close_tags ($ html) (
 / / Close all open tags in an array
 preg_match_all ("#<([ az] +) (.*)?(?!/)># iU ", $ html, $ result);
 $ Openedtags = $ result [1];

 / / All tags closed in an array
 preg_match_all ("#</([ az ]+)># iU ", $ html, $ result);
 $ Closedtags = $ result [1];

 $ Length = count ($ openedtags);

 / / All tags are closed
 if (count ($ closedtags) == $ length)
 return $ html;

 $ Openedtags = array_reverse ($ openedtags);
 / / Close Tags
 for ($ i = 0; length $ i <$, $ i + +) (
 if (in_array ($ openedtags [$ i], $ closedtags))
 $ Html .='</'.$ openedtags [$ i ].'>';
 else
 unset ($ closedtags [array_search ($ openedtags [$ i], $ closedtags)]);
 )
 return $ html;
 )

Source: textsnippets.com

21st March 2007
Nerd 2.0

Archive for WordPress! Without Links?

Today when I surfed by default on my blog, I suddenly discovered that appear in the blog archive links any more. The tags did not yet taken such as links, but had no content:

  <a href=""> Post Name </ a> 

Now I have made the search and lo and behold, there is a new version of the plugin.

Of course, I just updated the plugin. What happened? Of course, nothing!

So now after I sniffed something in the code and the comments on the page. Then you find this comment, which says as much free, simply by the last line of the function kg_archives () of "return $ koutput1;" "echo $ koutput1; must change 'in.

This time everything works well.

Finally back on a working archive!

Complete change and German file ...

Read more »

4th March 2007
Nerd 2.0

META tags, dynamic with Ultimate Tag Warrior!

You know the problem. UTW (Ultimate Tag Warrior) adds to all your pages meta-tags, not only for the main page.

To change this you have to simply insert this line in your header.php of your template.

 Php if (is_home ()) (?>
 <Meta name = "keywords" content = "<? Php UTW_ShowWeightedTagSet ('tagsettextonly','', 100);?>" />
 Php)?>

This will be your top 100 tags in the META tags.

There are allowed up to 1000 characters, you have to if you only words with more than 9 characters, the length used naturally turn something down.

Mfg BODY

18th December 2005
Nerd 2.0

Cronjob problem eliminated

Since I use the two cronjobs on the web space, unfortunately, can not cover very many scripts, I had to help out somehow mri. First, I've just written a file that work with the help of Time strings, but this was too complicated to which one could use it quickly and easily. But then I'm googling for something encountered on a script, which is supposed to help people who have no cron.

Here you can either enter cronjobs Unixformat almost in what has so many advantages.

# Comments start with '#'
# Mi hdm wtag this job
0 5 * * Sun cronjobs / dump.inc.php
# DB dump every Sunday to create five
40 5 2 * * cronjobs / sendlog.inc.php
# At the beginning of the month last server log file send
* / 15 8-19 * * Mon-Fri cronjobs / refr_ext.inc.php
# Refresh external news sources

Because the version on the page, but many bugs, has made fans have to work and it completely rewritten:
Download: http://www.digilog.de/fremddaten/pseudo-cron_131.zip

original page: http://www.bitfolge.de/pseudocron-de.html

Have fun BODY SNATCH