To get file size using batch file, we use variable with modifier. Then set /a, performs match operation (divide by 1024). Unlike other examples, this example works on any Windows language. @echo off :: Name: file_size.bat :: Author wishmesh.com :: Calculate file size in KB from %1 set /a size = %~z1 / 1024 echo …
Category Archives: Programming
Make asynchronous call in PHP using PHP socket and custom User agent string
Recently I wrote about async calls in PHP. In the provided example from w-shadow.com there is one thing missing – User agent string. Changing User agent string to something unique is handy, when analyzing log file. You can see, if someone is messing with your hidden asynchronous PHP script. Here is an example, that uses …
Continue reading “Make asynchronous call in PHP using PHP socket and custom User agent string”
Make asynchronous call in PHP
The problem is, that there is no standard way of making asynchronous function or other calls in PHP version 5. In search for async calls I found, that socket version works for me. Here is link to example from W-Shadow.com: How To Run A PHP Script In The Background