3 * Send purge requests for listed pages to squid
9 require_once( "commandLine.inc" );
11 $stdin = fopen( "php://stdin", "rt" );
14 while( !feof( $stdin ) ) {
15 $page = trim( fgets( $stdin ) );
16 if ( substr( $page, 0, 7 ) == 'http://' ) {
18 } elseif( $page !== '' ) {
19 $title = Title
::newFromText( $page );
21 $url = $title->getFullUrl();
24 if( isset( $options['purge'] ) ) {
25 $title->invalidateCache();
28 echo "(Invalid title '$page')\n";
33 echo "Purging " . count( $urls ) . " urls...\n";
34 $u = new SquidUpdate( $urls );