Jump to content

Search the Community

Showing results for tags 'shopeeapi'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Loại nội dung


Diễn đàn

  • Ban quản trị
    • Thông báo
    • Phòng họp
    • Phòng kỷ luật
  • Ngôn Ngữ Lập Trình
    • C Sharp
    • C/C++
    • AutoIt
    • AutoHotKey
    • Python
    • HTML/PHP/Javascipt
    • REGEX - Regular Expressions
  • Thuê code - Nhận code
    • Góc bán hàng
    • Người thuê code
    • Người nhận code
    • Bóc phốt - Cảnh báo lừa đảo
    • Góc trung gian
  • Máy Tính - Internet
    • Tin Nóng
    • Thủ Thuật Internet
    • Thế Giới Trò Chơi
    • Hệ Điều Hành Windows
    • Phần Mềm
    • MMO
  • Nhà Kho
    • Thùng Rác

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Lọc bởi số lượng của...

Đã tham gia

  • Start

    End


Group


About Me

Found 2 results

  1. Mình muốn lấy dữ liệu liked từ API, đây là cách mình làm, nhưng luôn trả về false( đã login và like sản phẩm). Mong cao nhân chỉ giáo $curlObj = curl_init(); curl_setopt($curlObj, CURLOPT_URL, 'https://shopee.vn'); curl_setopt($curlObj, CURLOPT_RETURNTRANSFER, 1); curl_setopt($curlObj, CURLOPT_HEADER, 1); curl_setopt($curlObj, CURLOPT_SSL_VERIFYPEER, false); $result = curl_exec($curlObj); preg_match_all('/^Set-Cookie:\s*([^;]*)/mi', $result, $match_found); $cookies = array(); foreach($match_found[1] as $item) { parse_str($item, $cookie); $cookies = array_merge($cookies, $cookie); } curl_close($curlObj); $url = 'https://shopee.vn/api/v2/item/get?shopid=302870756&itemid=5558354179'; $data_shopee = file_get_contents_ex($url, $cookies); $like_check = $data_shopee ['item']['liked']; echo $like_check // ccc function file_get_contents_ex($url, $cookie = null) { $opts = array( 'http' => array( 'method' => 'GET', 'user-agent'=> 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.109 Safari/537.36', 'header' => (!empty($cookie) ? "Cookie: ".http_build_query($cookie, '', '; ')."\r\n" : ''), ) ); $context = stream_context_create($opts); $contents = file_get_contents($url, false, $context); $json_data = json_decode($contents, true); return $json_data; }
  2. Mình sử dụng api :https://shopee.vn/api/v2/search_items/?by=pop&limit=30&match_id=166011623&newest=30&order=desc&page_type=shop&version=2 get được chuỗi json các sản phẩm của 1 shop nhưng phần ảnh thì bị lỗi, ở phần trình duyệt nó có thêm một chuỗi phía sau nữa . Mọi người ai có kinh nghiệm get ảnh này rồi mình mong có thể chia sẻ với ạ
×
×
  • Create New...