4 * Send purge requests for listed pages to squid
7 require_once( "commandLine.inc" );
9 $stdin = fopen( "php://stdin", "rt" );
12 while( !feof( $stdin ) ) {
13 $page = trim( fgets( $stdin ) );
14 if ( substr( $page, 0, 7 ) == 'http://' ) {
16 } elseif( $page !== '' ) {
17 $title = Title
::newFromText( $page );
19 $url = $title->getFullUrl();
22 if( isset( $options['purge'] ) ) {
23 $title->invalidateCache();
26 echo "(Invalid title '$page')\n";
31 echo "Purging " . count( $urls ) . " urls...\n";
32 $u = new SquidUpdate( $urls );