HEX
Server: Apache
System: Linux host.fiblib.com 5.14.0-611.5.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Nov 11 08:09:09 EST 2025 x86_64
User: agritoday (1002)
PHP: 8.1.33
Disabled: NONE
Upload Files
File: /home/agritoday/www/wp-content/plugins/td-composer/css-analyze/includes/td_analyze_css_util.php
<?php
/**
 * Created by ra.
 * Date: 7/19/2016
 */

class td_analyze_css_util {
	//generate unique_ids
	private static $unique_id_counter = 0;

	static function td_generate_unique_id() {
		self::$unique_id_counter++;
		return 'td_live_css_uid_' . self::$unique_id_counter . '_' . uniqid();
	}

	static function td_check_cache_dir( $dir ) {
	    if ( ! file_exists( $dir ) ) {
	        @mkdir( $dir, 0775, true );
	        if ( ! file_exists( $dir ) ) {
	            return false;
	        }
	    }

	    if ( ! is_writable( $dir ) ) {
	        return false;
	    }

	    $index_file = rtrim( $dir, '/\\' ) . '/index.html';
	    if ( ! is_file( $index_file ) ) {
	        @file_put_contents( $index_file, '<html><head><meta name="robots" content="noindex, nofollow"></head><body>Generated by TagDiv Css Analyzer</body></html>' );
	    }

	    return true;
	}
}