Archive

Archive for April, 2025

Scam warning: Shaw Holdings Pte ltd

Scam warning!

TL; DR;
If you get approached by this company for investment. It’s a scam. Evidence below
https://drive.google.com/drive/folders/1s8PmzNv9YZQI_C50Tx118cqO9REkJgvu?usp=sharing

I got approached by this company, which in the exchange of 2 emails offered a $1M investment. To good to be true. With zero-due diligence. I’ve been trhough similar processes before, and expect a month’s worth of due dilligence document preparation before getting to the point of an offer.

Anyway, so I did due dilligence on them, and specifically, their director:
NRIC/FIN/Passport No. : S8838988C
Name : CHENG YONG TECK
Nationality/Citizenship : SINGAPORE CITIZEN
Address : 10 MARTIN PLACE, #17-14, MARTIN MODERN, SINGAPORE 237963

The director being involved in a bizarre mix of different companies, including immigration ( link ) , weddings, plastic surgery ( link )  , Weight loss, and engineering companies.

 Specifically, the Plastic surgery business has left lots of people our of pocket, and is connected to the other holding company;  quote “Anyway, both Dore Aesthethics and Dore Clinic are owned by Kate Holdings.The Director is Cheng Yong Teck who lives in Orchard Residences. Born in 1988.”

Categories: Uncategorized

🔍 Fetching Adobe Profile Information by Email Using AvatarAPI

In the age of personalization and integration, being able to retrieve user profile images and basic information programmatically can be invaluable for CRMs, marketing platforms, and analytics systems. AvatarAPI provides a simple yet powerful way to fetch profile data from various providers, including Adobe, just by using an email address.

In this post, we’ll walk through how to retrieve Adobe profile details using AvatarAPI, including how to interpret the JSON response and especially the RawData payload.


📬 Making the Request

To fetch a user’s Adobe profile via AvatarAPI, you’ll need to send a POST request to:

https://avatarapi.com/v2/api.aspx

Here’s a sample request payload:

{
"username" : "demo",
"password" : "demo___",
"provider" : "Adobe",
"email" : "falecom@sergiolimabroker.com.br"
}

Replace username and password with your actual AvatarAPI credentials.


📦 Sample Response

Here’s what a successful response might look like:

{
"Name": "",
"Image": "https://mir-s3-cdn-cf.behance.net/user/276/63d4f1907178277.60f249006a140.jpg",
"Valid": true,
"City": "",
"Country": "",
"IsDefault": false,
"Success": true,
"RawData": "[{\"type\":\"individual\",\"authenticationMethods\":[{\"id\":\"google\",\"url\":\"https://adobeid-na1.services.adobe.com/renga-idprovider/social/v2/signin/google\"},{\"id\":\"password\",\"url\":null}],\"status\":{\"code\":\"active\",\"reason\":null},\"images\":{\"50\":\"https://mir-s3-cdn-cf.behance.net/user/50/63d4f1907178277.60f249006a140.jpg\",\"100\":\"https://mir-s3-cdn-cf.behance.net/user/100/63d4f1907178277.60f249006a140.jpg\",\"115\":\"https://mir-s3-cdn-cf.behance.net/user/115/63d4f1907178277.60f249006a140.jpg\",\"138\":\"https://mir-s3-cdn-cf.behance.net/user/138/63d4f1907178277.60f249006a140.jpg\",\"230\":\"https://mir-s3-cdn-cf.behance.net/user/230/63d4f1907178277.60f249006a140.jpg\",\"276\":\"https://mir-s3-cdn-cf.behance.net/user/276/63d4f1907178277.60f249006a140.jpg\"},\"hasT2ELinked\":false}]",
"Source": {
"Name": "Adobe"
}
}

🧠 Understanding the Response Fields

  • Image: URL of the profile image, typically hosted on Behance CDN.
  • Valid: Boolean indicating whether a profile was found.
  • IsDefault: Tells you whether the image is a generic placeholder or a custom user-uploaded image.
  • Success: Boolean status of the request.
  • Source: Confirms that the provider is Adobe.
  • RawData: This is a stringified JSON array with more granular details from the provider.

🔍 Deep Dive into RawData

Let’s parse the RawData field for a better understanding:

[
{
"type": "individual",
"authenticationMethods": [
{
"id": "google",
"url": "https://adobeid-na1.services.adobe.com/renga-idprovider/social/v2/signin/google"
},
{
"id": "password",
"url": null
}
],
"status": {
"code": "active",
"reason": null
},
"images": {
"50": "https://...50.jpg",
"100": "https://...100.jpg",
"115": "https://...115.jpg",
"138": "https://...138.jpg",
"230": "https://...230.jpg",
"276": "https://...276.jpg"
},
"hasT2ELinked": false
}
]

Key Elements:

  • type: Usually "individual", indicating a personal profile.
  • authenticationMethods: Shows available login methods for this Adobe account (e.g., Google, password).
  • status: Account status, with code typically being "active".
  • images: Dictionary of image sizes for the profile picture. Useful for responsive UI.
  • hasT2ELinked: Indicates whether the account is linked to two-factor authentication (T2E = Two-step or Two-element?).

🎯 Practical Use Case

If you’re building a user-facing dashboard, you can display a verified profile image directly using the Image field, and optionally allow your backend to parse RawData for more advanced logic, such as:

  • Detecting authentication methods.
  • Validating account status.
  • Choosing image resolution dynamically based on device.

Example (JavaScript):

const profileImgUrl = response.Image;
document.getElementById('avatar').src = profileImgUrl;

🧪 Pro Tip: Parsing RawData

Since RawData is a stringified JSON array, you’ll need to parse it manually:

const rawData = JSON.parse(response.RawData);
console.log(rawData[0].authenticationMethods);

✅ Conclusion

Using AvatarAPI, retrieving Adobe profile details is seamless and efficient. The rich JSON response, especially the RawData, provides developers with a powerful toolkit to enhance user profiles, drive personalization, or even verify identity with minimal effort.


If you’re using AvatarAPI in production or need help parsing the Adobe-specific data, feel free to reach out or drop your questions in the comments!

Categories: Uncategorized

How to Use the Car Rego API in WordPress

In this tutorial, we’ll walk through how to integrate the Car Registration API into a WordPress site. This method ensures that your username and API key are not publicly exposed.

Tools Used in This Demo

  1. WordPress
  2. Code Snippets (Free plugin)
  3. Elementor Pro (Paid website builder)

We’ll be using both PHP and JavaScript scripts. While there are multiple ways to accomplish this, the approach described here prioritizes security by keeping sensitive credentials hidden.


Step 1: Register for the API

Visit carregistrationapi.com and create an account to get your username/API key.


Step 2: Add the PHP Script

Use the Code Snippets plugin to add the PHP code. Paste the script into a new snippet and activate it.

🔁 Important: Replace the placeholder on line 16 with your actual username from Step 1.

add_action('elementor_pro/forms/new_record', function($record, $handler) {
    if (!session_id()) session_start();

    // ✅ Confirm hook fired
    //file_put_contents(WP_CONTENT_DIR . '/uploads/rego-debug.txt', "HOOK FIRED\n", FILE_APPEND);
    //check https://abc.com.au/wp-content/uploads/rego-debug.txt

    $form_id = $record->get_form_settings('form_id');
    if ('regoform' !== $form_id) return;

    //file_put_contents(WP_CONTENT_DIR . '/uploads/rego-debug.txt', "Form matched: $form_id\n", FILE_APPEND);

    $fields = $record->get('fields');
    $rego  = $fields['rego']['value'] ?? '';
    $state = $fields['state']['value'] ?? '';
    $username = 'ABC';

    $api_url = add_query_arg([
        'RegistrationNumber' => $rego,
        'State'              => $state,
        'username'           => $username,
    ], 'https://www.regcheck.org.uk/api/reg.asmx/CheckAustralia');

    // 🔍 API call
    $response = wp_remote_get($api_url);

    // ✅ ADD LOGGING BLOCK HERE
    //file_put_contents(WP_CONTENT_DIR . '/uploads/rego-debug.txt', "API URL: $api_url\n", FILE_APPEND);

    if (is_wp_error($response)) {
        $error_message = $response->get_error_message();
        file_put_contents(WP_CONTENT_DIR . '/uploads/rego-debug.txt', "API Error: $error_message\n", FILE_APPEND);
    } else {
        $body = wp_remote_retrieve_body($response);
        //file_put_contents(WP_CONTENT_DIR . '/uploads/rego-debug.txt', "API Response: $body\n", FILE_APPEND);

        // Parse response
        $xml = @simplexml_load_string($body);
        $vehicleJson = (string) ($xml->vehicleJson ?? '');
        $vehicleData = json_decode($vehicleJson, true);

        $_SESSION['rego_result'] = [
            'Description' => $vehicleData['Description'] ?? 'N/A',
            'Year'        => $vehicleData['RegistrationYear'] ?? 'N/A',
            'Engine'      => $vehicleData['Engine'] ?? 'N/A',
        ];
    }
}, 10, 2);

// Shortcode to display result
add_shortcode('rego_vehicle_info', function() {
    if (!session_id()) session_start();
	
	//$log_path = WP_CONTENT_DIR . '/uploads/rego-debug.txt';

    // Log shortcode execution
    //file_put_contents($log_path, "SHORTCODE TRIGGERED\n", FILE_APPEND);
	
    $data = $_SESSION['rego_result'] ?? null;

    if (!$data) {
        return '<p>No vehicle information available yet.</p>';
    }
	
    //file_put_contents($log_path, "Session Data: " . print_r($data, true) . "\n", FILE_APPEND);
	
    ob_start();
    ?>
    <div class="rego-vehicle-info">
        <h3>Vehicle Details</h3>
        <ul>
            <li><strong>Description:</strong> <?= esc_html($data['Description']) ?></li>
            <li><strong>Registration Year:</strong> <?= esc_html($data['Year']) ?></li>
            <li><strong>Engine:</strong> <?= esc_html($data['Engine']) ?></li>
        </ul>
    </div>
    <?php
    return ob_get_clean();
});

add_action('rest_api_init', function() {
    register_rest_route('rego/v1', '/data', [
        'methods' => 'GET',
        'callback' => function() {
            if (!session_id()) session_start();
            return $_SESSION['rego_result'] ?? ['error' => 'No data in session'];
        },
        'permission_callback' => '__return_true'
    ]);
});

Step 3: Create the Form and Layout on Your Website

a) Create the Form (Using Elementor or similar)

Structure your form with the following settings:

  • Form ID: regoform
  • Form Name: regoform
  • Rego Field:
    • ID: rego
    • Shortcode: [field id="rego"]
  • State Field:
    • ID: state
    • Shortcode: [field id="state"]

These field IDs will be referenced in the PHP and JavaScript scripts.

b) Add HTML Widgets

Use two separate HTML widgets in Elementor:

  1. For Displaying the Result:
    Add this HTML element: <div id="rego-result-container"></div>
  2. For the JavaScript Logic:
    Add the JavaScript snippet (you can remove or comment out any log messages if not needed).
<script>
window.addEventListener('load', function () {
    function waitForjQueryAndForm() {
        if (typeof jQuery === 'undefined') {
            console.log("⏳ Waiting for jQuery...");
            setTimeout(waitForjQueryAndForm, 100);
            return;
        }

        jQuery(function ($) {
            const $form = $('#regoform');

            if (!$form.length) {
                console.log("⏳ Waiting for form #regoform to appear...");
                setTimeout(waitForjQueryAndForm, 100);
                return;
            }

            console.log("✅ Found form #regoform");

            // Listen for form success response from Elementor Pro
            $form.on('submit_success', function () {
                console.log("✅ Form #regoform successfully submitted via AJAX");

                setTimeout(function () {
                    $.ajax({
                        url: '/wp-json/rego/v1/data',
                        method: 'GET',
                        success: function (data) {
                            console.log("✅ API response:", data);

                            if (data && !data.error) {
                                const html = `
                                    <div class="rego-vehicle-info">
                                        <h3>Vehicle Details</h3>
                                        <ul>
                                            <li><strong>Description:</strong> ${data.Description}</li>
                                            <li><strong>Registration Year:</strong> ${data.Year}</li>
                                            <li><strong>Engine:</strong> ${data.Engine}</li>
                                        </ul>
                                    </div>
                                `;
                                $('#rego-result-container').html(html);
                            } else {
                                $('#rego-result-container').html('<p>No vehicle info available.</p>');
                            }
                        },
                        error: function () {
                            $('#rego-result-container').html('<p>Failed to load vehicle info.</p>');
                        }
                    });
                }, 1000);
            });
        });
    }

    waitForjQueryAndForm();
});
</script>

How the Flow Works

  1. The user fills out the form and clicks the “Send” button.
  2. The form captures the rego and state values.
  3. The PHP script listens for the form action, calls the API, and fetches the results.
  4. The JavaScript reads the result and displays the data dynamically on the page.

Example

Here’s a basic demo in action