PHPテスト


echo ‘Today: ‘ . date(‘Y-m-d’);

$url = “http://www.shigotonavi.co.jp/api/search/”;

// cURLセッションを初期化
$ch = curl_init();

// オプションを設定
curl_setopt($ch, CURLOPT_URL, $url); // 取得するURLを指定
curl_setopt($ch, CURLOPT_key, 8c18e1b2b2e7dd8d4a13ecbd24049bbe); //
curl_setopt($ch, CURLOPT_sjt1, 0101000); //
curl_setopt($ch, CURLOPT_swt1, 002); //
curl_setopt($ch, CURLOPT_spc1, 013); //
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); // 実行結果を文字列で返す
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); // サーバー証明書の検証を行わない

// URLの情報を取得
$response = curl_exec($ch);

// 取得結果を表示
echo $response;
$result = json_decode($response, true);

// セッションを終了
curl_close($conn);

Follow me!

コメントを残す

メールアドレスが公開されることはありません。

前の記事

Hello world!