PHP Classes

File: index.php

Recommend this page to a friend!
  Classes of Chun-Sheng, Li   104 Jobs   index.php   Download  
File: index.php
Role: Example script
Content type: text/plain
Description: Example script
Class: 104 Jobs
Get details about jobs posted in the 104 Jobs site
Author: By
Last change:
Date: 5 years ago
Size: 658 bytes
 

Contents

Class file image Download
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8"/>
</head>
<body>
<?php

set_time_limit
(0);

require
'vendor/autoload.php';
require
'JobDetail.php';

use
peter\JobDetail\JobDetail;

$detail = new JobDetail();

$jobs = $detail->printResult();
$len = count($jobs);
$baseUrl = 'https://www.104.com.tw';
echo
'<table>';
echo
'<tr><th>????</th><th>??</th></tr>';

for(
$index=0;$index<$len;$index++) {
    echo
'<tr>';
    echo
'<td>'.$jobs[$index]['job_name'].'</td>';
    echo
'<td><a href="'.$baseUrl.$jobs[$index]['job_link'].'" target="_blank">'.$jobs[$index]['job_name'].'</a></td>';
    echo
'</tr>';
}
echo
'</table>';
?>
</body>
</htm1>