jobnet.dk script
<?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
// skab en curl session
$ch = curl_init();
curl_setopt($ch, CURLOPT_COOKIEJAR, "./cookieFileName");
curl_setopt($ch, CURLOPT_URL,"https://job.jobnet.dk/CV/login.aspx");
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, "SynkronLoginUsername=$username&SynkronLoginPassword=$password");
curl_exec ($ch); // execute the curl command
curl_close ($ch);
unset($ch);
// ny curl session
$ch = curl_init();
curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
curl_setopt($ch, CURLOPT_COOKIEFILE, "./cookieFileName");
curl_setopt($ch, CURLOPT_URL,"https://job.jobnet.dk/CV/TASS/ConfirmEnrolment/ConfirmEnrolmentReceipt.aspx");
$html = curl_exec ($ch);
curl_close ($ch);
echo $html;
?>
/**
* 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
// skab en curl session
$ch = curl_init();
curl_setopt($ch, CURLOPT_COOKIEJAR, "./cookieFileName");
curl_setopt($ch, CURLOPT_URL,"https://job.jobnet.dk/CV/login.aspx");
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, "SynkronLoginUsername=$username&SynkronLoginPassword=$password");
curl_exec ($ch); // execute the curl command
curl_close ($ch);
unset($ch);
// ny curl session
$ch = curl_init();
curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
curl_setopt($ch, CURLOPT_COOKIEFILE, "./cookieFileName");
curl_setopt($ch, CURLOPT_URL,"https://job.jobnet.dk/CV/TASS/ConfirmEnrolment/ConfirmEnrolmentReceipt.aspx");
$html = curl_exec ($ch);
curl_close ($ch);
echo $html;
?>
Fatal error:
Jeg har installeret curl og php
det køre på en debian server
# php auto.php
Fatal error: Call to undefined function: curl_init() in jobnet.client on line 22
kan du hjælpe?
mvh
/ib
installer curl
undefined function: curl_init()
Du har ikke installeret curl på din version af php. Du skal installere php-curl.
Debian:
åbn en terminal og skriv:
sudo aptitude install php5-curl