Last active
February 1, 2025 09:11
-
-
Save sh-sh-dev/542724a6ac72dc04623ecffaa4989620 to your computer and use it in GitHub Desktop.
Digikala Products Info
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function digikalaProduct($PID) { | |
$ch = curl_init(); | |
curl_setopt($ch, CURLOPT_URL, "https://api.digikala.com/v1/product/$PID/"); | |
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); | |
curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/98.0.4758.81 Safari/537.36"); | |
$output = curl_exec($ch); | |
curl_close($ch); | |
return $output; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
با سلام
لینک محصولات بصورت زیر تغییر یافته است:
https://api.digikala.com/v2/product/6850997/