function sachli_rubika_request_send_file()
{
    $settings = get_option('sachli_settings', []);

    $token = $settings['token'] ?? '';

    if (empty($token)) {
        return [
            'success' => false,
            'message' => 'Token is empty'
        ];
    }

    $url = "https://botapi.rubika.ir/v3/{$token}/requestSendFile";

    $response = wp_remote_post($url, [
        'headers' => [
            'Content-Type' => 'application/json'
        ],
        'body' => json_encode([
            'type' => 'Image'
        ])
    ]);

    if (is_wp_error($response)) {
        return [
            'success' => false,
            'message' => $response->get_error_message()
        ];
    }

    return json_decode(
        wp_remote_retrieve_body($response),
        true
    );
}

function sachli_rubika_upload_photo_test()
{
    $settings = get_option('sachli_settings', []);

    $token = $settings['token'] ?? '';

    $req = wp_remote_post(
        "https://botapi.rubika.ir/v3/{$token}/requestSendFile",
        [
            'headers' => [
                'Content-Type' => 'application/json'
            ],
            'body' => json_encode([
                'type' => 'Image'
            ])
        ]
    );

    $req_body = json_decode(
        wp_remote_retrieve_body($req),
        true
    );

    if (empty($req_body['data']['upload_url'])) {
        return $req_body;
    }

    $upload_url = $req_body['data']['upload_url'];

    $file_path = '/home/chliir/public_html/wp-content/uploads/2026/06/file_00000000647c71f4b9d5fdeb80ebe901.webp';

    $ch = curl_init();

    curl_setopt_array($ch, [
        CURLOPT_URL => $upload_url,
        CURLOPT_POST => true,
        CURLOPT_RETURNTRANSFER => true,
        CURLOPT_POSTFIELDS => [
            'file' => new CURLFile($file_path)
        ]
    ]);

    $result = curl_exec($ch);

    curl_close($ch);

    return $result;
}<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet type="text/xsl" href="//gallerysachli.ir/main-sitemap.xsl"?>
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
	<sitemap>
		<loc>https://gallerysachli.ir/post-sitemap.xml</loc>
		<lastmod>2026-06-08T17:37:56+00:00</lastmod>
	</sitemap>
	<sitemap>
		<loc>https://gallerysachli.ir/page-sitemap.xml</loc>
		<lastmod>2026-06-17T16:23:20+00:00</lastmod>
	</sitemap>
	<sitemap>
		<loc>https://gallerysachli.ir/product-sitemap.xml</loc>
		<lastmod>2026-06-17T16:20:37+00:00</lastmod>
	</sitemap>
	<sitemap>
		<loc>https://gallerysachli.ir/category-sitemap.xml</loc>
		<lastmod>2026-06-08T17:37:56+00:00</lastmod>
	</sitemap>
	<sitemap>
		<loc>https://gallerysachli.ir/product_brand-sitemap.xml</loc>
		<lastmod>2026-06-17T16:20:37+00:00</lastmod>
	</sitemap>
	<sitemap>
		<loc>https://gallerysachli.ir/product_cat-sitemap.xml</loc>
		<lastmod>2026-06-17T16:20:37+00:00</lastmod>
	</sitemap>
</sitemapindex>
<!-- XML Sitemap generated by Rank Math SEO Plugin (c) Rank Math - rankmath.com -->