Category: scripts

Run cron.php without crontab: now it’s possible.

Dear drupal webmaster newbies, this is for you!

Now it’s possible to run cron.php regularily, without any access to the server or without any knowledge about servers and crontab!

Just put these simple PHP lines in a block of your Drupal site, better if mostly present, or create a new block with them:

<?php
$tmstmp=mktime();
$last=file_get_contents("lastcron.txt");
if(($tmstmp-$last)>(60*60*6))
{
$pntr=fopen('lastcron.txt', 'w');
if(fwrite($pntr, $tmstmp))
{
mail ("dest","cron OK","OK");
include ("cron.php");
}
else
{

Cron senza crontab: è possibile.

Cari webmaster drupal in erba, questa è proprio per voi!

Far partire il cron.php regolarmente, senza avere accesso al server o senza saper gestire un server adesso è possibile!

Inserite queste semplici righe in PHP in un blocco qualunque di quelli che compaiono in modo fisso nelle vostre pagine oppure createne uno appositamente:

<?php
$tmstmp=mktime();
$last=file_get_contents("lastcron.txt");
if(($tmstmp-$last)>(60*60*6))
{
$pntr=fopen('lastcron.txt', 'w');
if(fwrite($pntr, $tmstmp))
{
mail ("dest","cron OK","OK");
include ("cron.php");
}
else
{

UNOFFICIAL GOOGLE SITEMAP GENERATOR PHP FREE TOOL

A PHP script to generate a file (XML) for the Google ‘SITEMAP’ service .
Unofficial Google Sitemap generator, for further information:
https://www.google.com/webmasters/sitemaps/
docs/en/protocol.html
.

HOW TO INSTALL

  • unpack the contento of the zip file on your webserver
  • surf to the corresponding url

HOW TO USE

  • insert a URLs list in the textarea (from “http://” one URL x line

MySQL Table Admin 1.0 – A PHP-MySQL front-end

A symple and easy script to manage MySQL tables. You can modify, add, delete records or lock some of these features.

HOW TO INSTALL

  • Unpack the zip file content on your web server
  • Modify settings as described by comments in index.php
  • see detailed instruction in adm.php to configure your own page
  • see further details in index.php

MySQL Tbl Adm 1.0 – A PHP-MySQL front-end
Created : August 24 2004
Author : Diego Belotti

Modified Code Beautifier

Modified Code Beautifier: a script to make a source PHP code more readable.

This script has been ‘borrowed’ (or should I say stolen? 😉 ) and modified from the one at the url http://www.tote-taste.de/X-Project/beautify/.

As the original author write: “This tool is designed to beautify PHP code, applying most of the PEAR standard requirements to it. It can even process really scrambled scripts, e.g. all code in one line, and thus may
help you to get scripts into a more readable form”.

HOW TO INSTALL

Drupal Sitemap Module addon

Ho provato ad utilizzare il modulo per drupal http://drupal.org/project/gsitemap che genera la google sitemap del sito automaticamente.

Per utilizzarlo in automatico con Google però, è necessario attivare i ‘clean urls’, altrimenti il motore di google non legge la mappa dal link http://www.diegobelotti.com/?q=gsitemap e viene restituito un errore.

Per risolvere il problema senza i ‘clean urls’ si può fare in questo modo.

Dopo aver installato e configurato il modulo gsitemap, caricare nella root (/) del proprio sito un file PHP (ad esempio sitemap.php) contenente queste semplici righe: