Hemmersbach automated at work php script via cron

Hemmersbach engineers need to log into a portal to state their “at work”.

Save this script and run it as a cron job to perform the task automatically .

<?php

$link = “[place your https://mystatus.hemmersbach.com/index.php?token=XXX here with the quotes]”;

$queryString = parse_url($link, PHP_URL_QUERY);

// Parse the query string to get individual parameters
parse_str($queryString, $params);

if (!isset($params[‘token’])) {
header(“Location: error.php”);
exit();
} else {
$token = $params[‘token’];

$form_data = array(
‘token’ => $token,
‘action’ => ‘Login’,
‘attendanceCheck’ => ‘0’
);

// Initialize cURL session
$curl = curl_init();

// Set cURL options
curl_setopt_array($curl, array(
CURLOPT_URL => $link,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_POSTFIELDS => http_build_query($form_data)
));

// Execute cURL request
$response = curl_exec($curl);

// Check for errors
if (curl_errno($curl)) {
echo ‘Error: ‘ . curl_error($curl);
} else {
//Done
exit();

}
// Close cURL session
curl_close($curl);
}

?>

 

 

Posted on May 27, 2024, 5:23 pm By
Categories: tech tips Tags: ,
Death to _blank

Death to _blank

https://chromewebstore.google.com/detail/death-to-blank/gneobebnilffgkejpfhlgkmpkipgbcno

Websites are becoming annoying  with fresh tabs being open for every item your shopping for is clicked on.

Death to _blank opens links on the same tab.

 

Posted on January 27, 2024, 1:27 pm By
Categories: tech tips Tags:
Export quickaccess

Quick access data is save in path\file

%AppData%\Microsoft\Windows\Recent\AutomaticDestinations\f01b4d95cf55d32a.automaticDestinations-ms

 

Export windows share files

Batch file to:
extract mapped windows shares
exclude saving H:\
produce an import.bat  file to be used to remap them
only paths with spaces need to be wrapped around quotes “” manually.

 

@echo off
setlocal enabledelayedexpansion

del import_shares.bat /q

REM Run net use command and filter lines containing “\”

 

for /f “tokens=2*” %%A in (‘net use ^| find “\”‘) do (

:: remove h:\
if /i “%%A” neq “H:” (

REM Remove “Microsoft Windows Network” text
set “sharePath=%%B”
set “sharePath=!sharePath:Microsoft Windows Network=!”

REM Trim leading and trailing spaces
for /f “tokens=* delims= ” %%C in (“!sharePath!”) do set “sharePath=%%C”

REM Display the result
echo net use %%A !sharePath!
echo net use %%A !sharePath! /persistent:yes >> import_shares.bat
)

)

endlocal

TIMEOUT /T 10

Download any Windows ISO

Visit uppdump.net

Posted on October 26, 2023, 11:23 pm By
Categories: tech tips Tags:
Free Microsoft Word Excel Powerpoint

Press CTRL ALT SHIFT WINDOWS signed up for free web  office 365.

Posted on October 19, 2023, 7:17 am By
Categories: tech tips Tags:
Audio Downloader Prime + dirrty.remix.es

Grab Audio Downloader Prime chrome extension and it works on  https://dirrty.remix.es/

Posted on August 30, 2023, 5:41 pm By
Categories: tech tips Tags: ,
Bios Password Unlock

https://bios-pw.org/

Posted on July 17, 2023, 8:43 pm By
Categories: tech tips Tags: ,
Youtube to mp3 convertor

just ignore any popups …

https://ytmp3hub.com/

Posted on July 3, 2023, 4:30 pm By
Categories: tech tips Tags: ,
Decentralised chat options

Checking out options …

https://briarproject.org/ – no images , i think

https://berty.tech/

https://scuttlebutt.nz/ – this ones interesting but convoluted to setup

https://element.io/ – most polished

Posted on July 3, 2023, 1:55 pm By
Categories: tech tips Tags:

Next Page