S
S
Seth262015-06-08 21:54:01
PHP
Seth26, 2015-06-08 21:54:01

Filling out the finished document form on the site and saving it in PDF, how to implement it?

I saw that there is a similar resource, but I can not find it, can you tell me? www.pdfescape.com/windows do not apply

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Sergey Sokolov, 2018-08-17
@GM_pAnda

Iterates over an array of serials. By simple bitwise operations, the derivatives of the URL and the last two parts in the serial are compared. If they match, the "key" key with the value of the matched key is added to the Core::$url array.
It is more convenient to parse a long string by breaking the construction:

$d = array('test-site', 'ru');
$e = array('ST-214E2210-33FE865E-EC05E9A3', 'ST-204C2010-3DEFEFBE-C30E1243', 'ST-214E4000-3D4F3356-E2BCEEBB');

do {
  $b = implode('.', $d); // склеили, получили "test_site.ru"
          
  foreach ($e as $sKey){ // перебираем ключи
    $a = explode('-', $sKey) + array(0, 0, 0, 0); // разбили по дефису в массив,
    // убедились, что в массиве как минимум 4 элемента (если меньше, допис. нулями)
                
    !( // логическое отрицание того, что в скобках
    	Core::convert64b32( // из 64 бит в 32
    		Core::convert64b32(
    			hexdec($a[3]) // последний фрагмент ключа перевели из 16-ричного в 10-е число
    		) 
    		^  // ксор, побитовое исключающее ИЛИ
    		abs(Core::crc32($b))  // 32-битное число, хэш из адреса сайта
    	) 
    	^  // XOR см. выше
    	~(  // побитовое отрицание
    		Core::convert64b32(
    			Core_Array::get( // тут из конфига получают значение "hostcms" 
    				Core::$config->get('core_hostcms'),
    				'hostcms'
    			)
    		) 
    		&  // побитовое И
    		abs(Core::crc32($b))
    		^
    		Core::convert64b32(
    			hexdec($a[2]) // предпоследний фрагмент из ключа, как число
    		)
    	)
    )
    &&  // только если выше в скобках получился 0, выполнится следующая строка
    Core::$url['key'] = $sKey;
  }
  array_shift($d);
} while(count($d) > 1);

$a = explode('-', $sKey) + array(0, 0, 0, 0);

A
Alexander Taratin, 2015-06-08
@Seth26

https://www.google.ru/webhp?sourceid=chrome-instan...
https://parall.ax/products/jspdf <-- not friendly with Cyrillic

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question