if(eregi("\.(jpg|gif)$", $entry)){   
 
}
 
Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • blinkbits
  • BlinkList
  • blogmarks
  • co.mments
  • del.icio.us
  • De.lirio.us
  • digg
  • Fark
  • feedmelinks
  • Furl
  • LinkaGoGo
  • Ma.gnolia
  • NewsVine
  • Reddit
  • scuttle
  • Smarking
  • Spurl
  • YahooMyWeb
  • DZone
  • Internetmedia
  • Snap2r
  • Technorati

Ottimo tutorial di carlo daniele su come accedere alle API di flickr con Php

Parte 1: http://digitaladoptive.wordpress.com/...prima-parte/
Parte 2: http://digitaladoptive.wordpress.com/...seconda-parte/
Parte 3: http://digitaladoptive.wordpress.com/...terza-parte/

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • blinkbits
  • BlinkList
  • blogmarks
  • co.mments
  • del.icio.us
  • De.lirio.us
  • digg
  • Fark
  • feedmelinks
  • Furl
  • LinkaGoGo
  • Ma.gnolia
  • NewsVine
  • Reddit
  • scuttle
  • Smarking
  • Spurl
  • YahooMyWeb
  • DZone
  • Internetmedia
  • Snap2r
  • Technorati
30
06

Download di file come allegati con php

posted di Administrator, in php, tutorials. No Commenti
 
< ?php
/*
//Example:
streamAttached('/path/to/file.txt','filename.txt');
*/
function streamAttached($path,$name)
{
    header('Pragma: private');
    header('Cache-control: private, must-revalidate');
    header("Content-Type: application/octet-stream");
    header("Content-Length: " .(string)(filesize($path)) );
    header('Content-Disposition: attachment; filename="'.($name).'"');
    readfile($path);
    exit;
}
?>
 

Via: http://www.sourcerally.net/Scripts/58-Download-files-as-attachments

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • blinkbits
  • BlinkList
  • blogmarks
  • co.mments
  • del.icio.us
  • De.lirio.us
  • digg
  • Fark
  • feedmelinks
  • Furl
  • LinkaGoGo
  • Ma.gnolia
  • NewsVine
  • Reddit
  • scuttle
  • Smarking
  • Spurl
  • YahooMyWeb
  • DZone
  • Internetmedia
  • Snap2r
  • Technorati
 
function stripLargeTags($html){
    $searches = array (
        "/< !\[CDATA\[(.*)\]\]>/si", // Remove CData
        "/<script [^>]*>.*?< \/script>/si", // Strip out javascript
        "/
<style [^>]*>.*?< \/style>/si", // Strip out styles
        "/<code [^>]*>.*?< \/code>/si", // Strip out code chunks
        "/<!--.*?-->/s", // Strip comments
         "/< !.*>/Us", // Strip !Tags
         "/< \?.*>/Us" // Strip !Tags
    );
    $replace = array();
    foreach($searches as $search){
        array_push($replace, ''); // Replace all with ''
    } reset($searches);
    $text = preg_replace($searches, $replace, $html);
    return $text;
}
</code></style>
 
</script>
Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • blinkbits
  • BlinkList
  • blogmarks
  • co.mments
  • del.icio.us
  • De.lirio.us
  • digg
  • Fark
  • feedmelinks
  • Furl
  • LinkaGoGo
  • Ma.gnolia
  • NewsVine
  • Reddit
  • scuttle
  • Smarking
  • Spurl
  • YahooMyWeb
  • DZone
  • Internetmedia
  • Snap2r
  • Technorati

phpcaptcha è un ottimo script php contro lo spam dei moduli che utilizza una immagine per consentire solo agli umani di poter leggere il codice scritto.

Sito web: http://www.phpcaptcha.org/

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • blinkbits
  • BlinkList
  • blogmarks
  • co.mments
  • del.icio.us
  • De.lirio.us
  • digg
  • Fark
  • feedmelinks
  • Furl
  • LinkaGoGo
  • Ma.gnolia
  • NewsVine
  • Reddit
  • scuttle
  • Smarking
  • Spurl
  • YahooMyWeb
  • DZone
  • Internetmedia
  • Snap2r
  • Technorati

piwik è un progetto open source (GPL license) scritto in php mysql per la gestione di statistiche di siti web. Molto potente e completo, sfrutta ajax per la visualizzazione delle informazioni.

Sito web: http://piwik.org/

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • blinkbits
  • BlinkList
  • blogmarks
  • co.mments
  • del.icio.us
  • De.lirio.us
  • digg
  • Fark
  • feedmelinks
  • Furl
  • LinkaGoGo
  • Ma.gnolia
  • NewsVine
  • Reddit
  • scuttle
  • Smarking
  • Spurl
  • YahooMyWeb
  • DZone
  • Internetmedia
  • Snap2r
  • Technorati

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • blinkbits
  • BlinkList
  • blogmarks
  • co.mments
  • del.icio.us
  • De.lirio.us
  • digg
  • Fark
  • feedmelinks
  • Furl
  • LinkaGoGo
  • Ma.gnolia
  • NewsVine
  • Reddit
  • scuttle
  • Smarking
  • Spurl
  • YahooMyWeb
  • DZone
  • Internetmedia
  • Snap2r
  • Technorati

Sphider script php per creare motore di ricerca nel proprio sito web dotato di spider

Sphider è un open-source web spider e motore di ricerca. Includes un automated crawler, che può seguire i links di un sito e indicizzarli. Scritto in PHP e usa MySQL.

Spidering and indexing

Performs full text indexing.
Can index both static and dynamic pages.
Finds links in href, frame, area and meta tags, and can also follow links given in javascript as strings via window.location and window.open.
Respects robots.txt protocol, and nofollow and noindex tags.
Follows server side redirections.
Allows spidering to be limited by depth (ie maximum number of clicks from the starting page), by (sub)domain or by directory.
Allows spidering only the urls matching (or not matching) certain keywords or regular expressions.
Supports indexing of pdf and doc files (using external binaries for file conversion).
Allows resuming paused spidering.
Possbility to exclude common words from being indexed.
Searching
Supports AND, OR and phrase searches
Supports excluding words (by putting a '-' in front of a word, any page including the word will be omitted from the results).
Option to add and group sites into categories
Possibility to limit searching to a given category and its subcategories.
Possibility of searcing in a specified domain only.
"Did you mean" search suggestion on mistyped queries.
Context-sensitive auto-completion on search terms (a la Google Suggest)
Word stemming for english (searching for "run" finds "running", "runs" etc)
Administering
Includes a sophisticated web based administration interface
Supports indexing via a web interface as well as from commandline - easy to set up cron jobs.
Comprehensive site and search statistics
Simple template system - easy to integrate into a site

Sito web: http://www.sphider.eu/index.php

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • blinkbits
  • BlinkList
  • blogmarks
  • co.mments
  • del.icio.us
  • De.lirio.us
  • digg
  • Fark
  • feedmelinks
  • Furl
  • LinkaGoGo
  • Ma.gnolia
  • NewsVine
  • Reddit
  • scuttle
  • Smarking
  • Spurl
  • YahooMyWeb
  • DZone
  • Internetmedia
  • Snap2r
  • Technorati

Stupid htaccess tricks

Ottima raccolta di htaccess tricks con cui poter risolvere tutti i problemi legati al rewriting delle pagine.

Table of Contents

Sito web: http://perishablepress.com/press/2006/01/10/stupid-htaccess-tricks/

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • blinkbits
  • BlinkList
  • blogmarks
  • co.mments
  • del.icio.us
  • De.lirio.us
  • digg
  • Fark
  • feedmelinks
  • Furl
  • LinkaGoGo
  • Ma.gnolia
  • NewsVine
  • Reddit
  • scuttle
  • Smarking
  • Spurl
  • YahooMyWeb
  • DZone
  • Internetmedia
  • Snap2r
  • Technorati

Damn Small Rich Text Editor

Damn Small Rich Text Editor è un editor wysiwyg di piccole dimensioni che ha tutte le caratteristiche dei piu grossi editor wysiwyg quali tinymce etc..

Sito web: http://avidansoft.com/dsrte/index.php

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.