12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364 |
- <?php
- $logo = get_field('logo');
- $title = get_field('title');
- $description = get_field('description');
- $url = 'http://103.109.52.3/webapi/api/EmployeeInfo';
- $response = wp_remote_post(
- $url,
- array(
- // 'timeout' => 120,
- // 'httpversion' => '1.1',
- 'body' => array(
- 'user_login_id' => 'api_user',
- 'login_id' => 'SS',
- 'auth_token' => 'api_user20230419045143'
- )
- )
- );
- // $url = 'https://www.flickr.com/services/rest/';
- // $arguments = array(
- // 'api_key' => 'f49df4a290d8f224ecd56536af51FF77',
- // 'method' => 'flickr.people.getPublicPhotos',
- // 'format' => 'json',
- // 'user_id' => $user_id,
- // 'per_page'=> $photos_number,
- // );
- // $url_parameters = array();
- // foreach ($arguments as $key => $value){
- // $url_parameters[] = $key.'='.$value;
- // }
- // $url = $url.implode('&', $url_parameters);
- // $request = wp_remote_get($url, $options);
- // return load_request($request);
- // function load_request($response)
- // {
- // try {
- // $json = json_decode($response['body']);
- // } catch (Exception $ex) {
- // $json = null;
- // }
- // return $json;
- // }
- echo '<div class="portfolio-item">';
- if (!empty($logo))
- echo wp_get_attachment_image($logo['ID'], 'thumbnail', null, array('class' => 'portfolio-logo alignleft'));
- if (!empty($title))
- echo '<h3 class="portfolio-title">' . $title . '</h3>';
- if (!empty($description))
- echo '<div class="portfolio-description">' . $description . '</div>';
- var_dump($response);
- // echo '<div class="test">' . $request . '</div>';
- echo '</div>';
|