Category: php

Rotazione di una immagine con PHP!

Ottenere informazioni Whois con PHP

Gzip di file CSS con PHP

Comprimere il tuo codice HTML con PHP!

[PHP - WordPress] Ottenere un feed RSS e visualizzare i record con un loop

Nel tutorial di oggi imparerete come ottenere un feed RSS e visualizzare i record con un ciclo.

 
< ?php
include_once(ABSPATH . WPINC . '/rss.php');
$feed = 'http://dangayle.com/feed/';
$rss = fetch_feed($feed);
if (!is_wp_error( $rss ) ) :
        $maxitems = $rss->get_item_quantity(3);
    $rss_items = $rss->get_items(0, $maxitems);
    if ($rss_items):
        echo "
<ul>\n";
        foreach ( $rss_items as $item ) :
            //instead of a bunch of string concatenation or echoes, I prefer the terseness of printf
            //(http://php.net/manual/en/function.printf.php)
            printf('
<li><a href="%s">%s</a>
 
%s
</li>

Creare un sistema di backup di un database MySQL con PHP!

Nel tutorial di oggi vedremo come creare una interessante funzione che permette di eseguire un backup dell’intero database.
Se volete creare un sistema automatico di backup, potete utilizzare i cron e richiamare ogni notte il file che contiene questa funzione.

 
< ?php
backup_database_tables('HOST','USERNAME','PASSWORD','DATABASE', '*');
 
// backup the db function
function backup_database_tables($host,$user,$pass,$name,$tables)
{
 
    $link = mysql_connect($host,$user,$pass);
    mysql_select_db($name,$link);
 
    //get all of the tables
    if($tables == '*')
    {
        $tables = …

Creare una pagina di errore che controlla tutti gli errori con PHP

Controllare se una URL è online con PHP

Aggiungere il pulsante di Pinterest sul vostro blog WordPress

Cache intelligente con PHP!

[PHP] Come controllare se un sito è up

Condividi





Booking online




Categorie