Script for aktivering af aktiv Jobsøgning

Written By: diversen (24-Feb-2010 13:19:53) Add Comment

#!/usr/bin/php
<?php

/**
 * jobnet.client
 *
 * dette script er for at logge ind i jobnet.dk's database og automatisk bekræfte
 * at du fortsat er aktivt jobsøgende.
 * Ændr $password og $username i det næste og kør scriptet:
 *
 * php jobnet.client
 *
 * Og du vil atutomatisk bekræfte at du søger job.
 */

// jobnet login og username
$username 'username'// som regel din email
$password 'password'// dit password


$ch curl_init();
curl_setopt($chCURLOPT_COOKIEJAR"./cookieFileName");
curl_setopt($chCURLOPT_URL,"https://job.jobnet.dk/CV/Login/Login.aspx");
curl_setopt($chCURLOPT_RETURNTRANSFER,1);
curl_setopt($chCURLOPT_FOLLOWLOCATIONtrue);
curl_setopt($chCURLOPT_POST1);

$post_fields "ctl00\$ctl00\$JobnetBaseMiddelContent\$LoginContentPlaceHolder\$txtUsername=$username&";
$post_fields.= "ctl00\$ctl00\$JobnetBaseMiddelContent\$LoginContentPlaceHolder\$txtPassword=$password&";
$post_fields.= "ctl00\$ctl00\$JobnetBaseMiddelContent\$LoginContentPlaceHolder\$btnLogon=Log ind&";
$post_fields.= "__VIEWSTATE=$ret[__VIEWSTATE]";
curl_setopt($chCURLOPT_POSTFIELDS$post_fields);

$html curl_exec ($ch); // execute the curl command
echo $html;

curl_close ($ch);
unset(
$ch);

// ny curl session
$ch curl_init();
curl_setopt($chCURLOPT_RETURNTRANSFER,1);
curl_setopt($chCURLOPT_COOKIEFILE"./cookieFileName");
curl_setopt($chCURLOPT_URL"https://job.jobnet.dk/CV/TASS/ConfirmEnrolment/ConfirmEnrolmentReceipt.aspx");

curl_setopt($chCURLOPT_POST1);

$post_fields "ctl00\$ctl00\$ctl00\$JobnetBaseMiddelContent\$UncachedPageMiddelContent\$JobSeekerMiddelContentPlaceHolder\$UserActionBox1\$_btnAction=Bekræft aktiv jobsøgning";
$post_fields.= "__VIEWSTATE=$ret[__VIEWSTATE]";

$html curl_exec ($ch);
curl_close ($ch);

echo 
$html;


Files

jobnet.sh

Download shell script til jobnet.