$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://www.osta.ee/ru/zavershajutsja');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');
curl_setopt($ch, CURLOPT_ENCODING, 'gzip, deflate');
$headers = array();
$headers[] = 'Authority: www.osta.ee';
$headers[] = 'Cache-Control: max-age=0';
$headers[] = 'Sec-Ch-Ua: ^^';
$headers[] = 'Sec-Ch-Ua-Mobile: ?0';
$headers[] = 'Sec-Ch-Ua-Platform: ^^Windows^^\"\"';
$headers[] = 'Upgrade-Insecure-Requests: 1';
$headers[] = 'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4844.51 Safari/537.36';
$headers[] = 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9';
$headers[] = 'Sec-Fetch-Site: same-origin';
$headers[] = 'Sec-Fetch-Mode: navigate';
$headers[] = 'Sec-Fetch-User: ?1';
$headers[] = 'Sec-Fetch-Dest: document';
$headers[] = 'Referer: https://www.osta.ee/ru';
$headers[] = 'Accept-Language: ru-RU,ru;q=0.9,en-US;q=0.8,en;q=0.7';
$headers[] = 'Cookie: device_pixel_ratio_v1=1.75; OptanonAlertBoxClosed=2022-01-26T14:56:30.029Z; _ga=GA1.2.551620599.1643208990; _fbp=fb.1.1643208990303.498189522; __gads=ID=9f651494fe3bd9bd:T=1643209036:S=ALNI_MYStkkdIQzPndM4GtIGEIV2i8hZGA; autologin_v1=482200^%^3A0325e058ebb3fbe21841c694d60063be; osta_analytics_v1=c8a5613c09df03564da023764efbdd01; ostaee_public_v1=f4b6360fc974ae5899ce0321713b21f1; eupubconsent-v2=CPTbcp2PTbcp2AcABBENCGCsAP_AAH_AAChQIhtf_X__b3_j-_5_f_t0eY1P9_7_v-0zjhfdt-8N3f_X_L8X42M7vF36pq4KuR4Eu3LBIQVlHOHcTUmw6okVrzPsbk2cr7NKJ7PEmnMbO2dYGH9_n93TuZKY7______z_v-v_v____f_7-3_3__5_3---_e_V_99zLv9____39nP___9v-_9____giGASYal5AF2JY4Mm0aVQogRhWEh0AoAKKAYWiKwgdXBTsrgJ9QQsAEAqAjAiBBiCjBgEAAAEASERASAHggEQBEAgABACpAQgAI2AQWAFgYBAAKAaFiBFAEIEhBkcFRymBARItFBPZWIJQd7GmEIZZYAUCj-ioQEShBAsDISFg5jgCQEuFkgWYoXyAAA.f_gAD_gAAAAA; _gid=GA1.2.442052530.1647202124; lang_v1=ru; __cf_bm=bSXIqfE5Z6OjLVW3nZPzafl26I9jGYW7Wp6yyjrfwrA-1647203272-0-AYP8rICuSbLvNw2mu42/wvgEAu4LjOjHnAGtPJl7KOv1d42z+esbb2cDWzcOOH80ZE3eES1B0d+NPAgz4PF1VVu2xUipG5C0Bi0M+tAWw7IiqG9gq57RASivTqtlVL0LyrpFpXPZlZd5tINsmLpgR2xLL2y85J/pKe17RStrDycy; OptanonConsent=isGpcEnabled=0&datestamp=Sun+Mar+13+2022+22^%^3A31^%^3A04+GMT^%^2B0200+(^%^D0^%^92^%^D0^%^BE^%^D1^%^81^%^D1^%^82^%^D0^%^BE^%^D1^%^87^%^D0^%^BD^%^D0^%^B0^%^D1^%^8F+^%^D0^%^95^%^D0^%^B2^%^D1^%^80^%^D0^%^BE^%^D0^%^BF^%^D0^%^B0^%^2C+^%^D1^%^81^%^D1^%^82^%^D0^%^B0^%^D0^%^BD^%^D0^%^B4^%^D0^%^B0^%^D1^%^80^%^D1^%^82^%^D0^%^BD^%^D0^%^BE^%^D0^%^B5+^%^D0^%^B2^%^D1^%^80^%^D0^%^B5^%^D0^%^BC^%^D1^%^8F)&version=6.16.0&isIABGlobal=false&hosts=&consentId=51dbf77d-92af-45aa-b6b4-6a7de6249bdf&interactionCount=1&landingPath=NotLandingPage&groups=C0004^%^3A1^%^2CC0003^%^3A1^%^2CC0002^%^3A1^%^2CC0001^%^3A1^%^2CSTACK42^%^3A1&geolocation=EE^%^3B37&AwaitingReconsent=false; last_visit_v1=1647203464';
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
$result = curl_exec($ch);
if (curl_errno($ch)) {
echo 'Error:' . curl_error($ch);
}
echo ($result);
curl_close($ch);
Обзор
URL: https://www.facebook.com/api/graphql/
Статус: 200
Источник: Сеть
Адрес: 157.240.194.35:443
Инициатор:
D020-OxzLv0.js:137:5103
Запрос
:method: POST
:scheme: https
:authority: www.facebook.com
:path: /api/graphql/
Accept: */*
Content-Type: application/x-www-form-urlencoded
Origin: https://www.facebook.com
Cookie: c_user=100002380436476; fr=1uSU07RrFB6EuOw7t.AWVllLLVtaSEnlZQ4OkkmZzu87A.BfzMIH.hz.F_7.0.0.Bf_K1e.AWW8LMqsRR4; spin=r.1003172213_b.trunk_t.1610394974_s.1_v.2_; xs=4%3A77zU69615NecDA%3A2%3A1607254535%3A13937%3A4004%3A%3AAcWYwxoM6tiHWkq3n-BBdDJe5WEDLrntuWImc5wxyUg; wd=1680x883; x-referer=eyJyIjoiL21hcmtldHBsYWNlLz9yZWY9Ym9va21hcmtzJmFwcF9pZD0xNjA2ODU0MTMyOTMyOTU1IiwiaCI6Ii9tYXJrZXRwbGFjZS8%2FcmVmPWJvb2ttYXJrcyZhcHBfaWQ9MTYwNjg1NDEzMjkzMjk1NSIsInMiOiJtb2JpbGUifQ%3D%3D; m_pixel_ratio=2; _fbp=fb.1.1610291847884.2025494105; dpr=2; datr=AsLMX3AO9DTgC3a82Cg9zvKT; sb=B8LMX3whRwpF55z2fkK1KnE6
Content-Length: 3261
Accept-Language: ru
Host: www.facebook.com
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.1.2 Safari/605.1.15
Referer: https://www.facebook.com/marketplace/
Accept-Encoding: gzip, deflate, br
Connection: keep-alive
Ответ
:status: 200
Access-Control-Allow-Origin: https://www.facebook.com
Content-Type: text/html; charset="utf-8"
Pragma: no-cache
Content-Security-Policy: default-src * data: blob: 'self';script-src *.facebook.com *.fbcdn.net *.facebook.net *.google-analytics.com *.virtualearth.net *.google.com 127.0.0.1:* *.spotilocal.com:* 'unsafe-inline' 'unsafe-eval' blob: data: 'self';style-src data: blob: 'unsafe-inline' *;connect-src *.facebook.com facebook.com *.fbcdn.net *.facebook.net *.spotilocal.com:* wss://*.facebook.com:* https://fb.scanandcleanlocal.com:* attachment.fbsbx.com ws://localhost:* blob: *.cdninstagram.com 'self';block-all-mixed-content;upgrade-insecure-requests;
Content-Encoding: gzip
Access-Control-Allow-Methods: OPTIONS
X-XSS-Protection: 0
Access-Control-Expose-Headers: X-FB-Debug, X-Loader-Length
Expires: Sat, 01 Jan 2000 00:00:00 GMT
Cache-Control: private, no-cache, no-store, must-revalidate
Date: Mon, 11 Jan 2021 19:56:49 GMT
Access-Control-Allow-Credentials: true
X-Content-Type-Options: nosniff
Vary: Origin, Accept-Encoding
X-Frame-Options: DENY
x-fb-debug: mYAg0KSyajVtHSPOS+JaT2uJ67pQaO0vLG9MrnWOFgpSbor4KB9tt5jsPN+gkZRbC1fU1TKySnIrPYK0VunsJQ==
x-fb-rlafr: 0
Alt-Svc: h3-29=":443"; ma=3600,h3-27=":443"; ma=3600
Strict-Transport-Security: max-age=15552000; preload
Данные запроса
MIME-тип: application/x-www-form-urlencoded
av: 100002380436476
__user: 100002380436476
__a: 1
__dyn: 7AzHxqU5a5Q2m3mbG2KnFw9uu2i5U4e1ZyUW3q32363K1uwJxS1AwWwpUe8hw2nVEtwMw65xO0FE88628wgolzUO0n2US2G2Caw9m8wsU9kbxSE6q0Mo5W3e9xy48aU5qfK6E7e58jwGzE2sxGm2SUnxq5olwUwHxm4-5o4q3y1Mzqxq2K2-
__csr: ggPsvPiNa4N4ApZZN5F8GuNJiRNbhrHF-y4OWpatRiGXFfCh8GV5BKr_AWEyLABHAjCp5GjyV98Feh9Z4AGrCxC2xV9E-F8_yUymmFaKaHyqWzpHhEGp7l5zF9UoCKm8z8ix7GgxEN6DxWqrzEO9h4FoCu4qBDAx24oDxPKmuU_wKVpEpx68xy58jxd0xx9a4EbosAAzaUfoN1qq582XyU88gxq2-V8XxK2m8woojwIwVzbwhk2G2e1qBzoybxm3S58pwCxKbyXw0L2w0isU236F9o0Tp064wch0820C448yiq9BAzoao4O75wHw5Mg2Nw0TLw
__req: g
__beoa: 0
__pc: EXP2:comet_pkg
dpr: 2
__ccg: EXCELLENT
__rev: 1003172213
__s: haynj3:iqmk53:vaoygx
__hsi: 6916593779143614139-0
__comet_req: 1
fb_dtsg: AQH3iqhnsPWK:AQFMJRQaxM_h
jazoest: 22139
__spin_r: 1003172213
__spin_b: trunk
__spin_t: 1610394981
fb_api_caller_class: RelayModern
fb_api_req_friendly_name: MarketplaceCometBrowseFeedLightPaginationQuery
variables: {"buyLocation":{"latitude":59.41855,"longitude":24.75171},"count":5,"cursor":"{\"basic\":{\"item_index\":5},\"ads\":{\"items_since_last_ad\":6,\"items_retrieved\":7,\"ad_index\":2,\"ad_slot\":2,\"dynamic_gap_rule\":0,\"counted_organic_items\":0,\"average_organic_score\":0,\"is_dynamic_gap_rule_set\":false,\"first_organic_score\":0,\"is_dynamic_initial_gap_set\":false,\"iterated_organic_items\":1,\"top_organic_score\":0,\"feed_slice_number\":2,\"feed_retrieved_items\":6,\"ad_req_id\":920043853,\"refresh_ts\":0,\"cursor_id\":9409,\"mc_id\":0},\"boosted_ads\":{\"items_since_last_ad\":0,\"items_retrieved\":7,\"ad_index\":0,\"ad_slot\":0,\"dynamic_gap_rule\":0,\"counted_organic_items\":0,\"average_organic_score\":0,\"is_dynamic_gap_rule_set\":false,\"first_organic_score\":0,\"is_dynamic_initial_gap_set\":false,\"iterated_organic_items\":0,\"top_organic_score\":0,\"feed_slice_number\":0,\"feed_retrieved_items\":0,\"ad_req_id\":0,\"refresh_ts\":0,\"cursor_id\":50436,\"mc_id\":0},\"lightning\":{\"initial_request\":false,\"top_unit_item_ids\":[3716082361781827,3568436279941798,3288653477907905,4995562120515806,3587812901255495,3696165533785835,3608428919223909,3323266594462911,3078079358968529,4001222449901830,3537409013046629,3700569876672143,3594299727291084,3617195381649696,4227103020651747,3164542650313320,3816302825099593,5031048756970339,3567835266635881,3235112126603970],\"ranking_signature\":8864037669663932416,\"qid\":6916593779813727506}}","imageWidth":256,"mediaType":"image/jpeg","radius":31000,"scale":2,"sizing":"cover-fill-cropped","useSDFPath":true}
server_timestamps: true
doc_id: 3212192612220638
curl "https://www.facebook.com/api/graphql/" ^
-H "authority: www.facebook.com" ^
-H "user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.141 Safari/537.36 Edg/87.0.664.75" ^
-H "content-type: application/x-www-form-urlencoded" ^
-H "accept: */*" ^
-H "origin: https://www.facebook.com" ^
-H "sec-fetch-site: same-origin" ^
-H "sec-fetch-mode: cors" ^
-H "sec-fetch-dest: empty" ^
-H "referer: https://www.facebook.com/marketplace/category/electronics" ^
-H "accept-language: ru,en;q=0.9,en-GB;q=0.8,en-US;q=0.7,et;q=0.6" ^
-H "cookie: datr=2qr4X0nrqkswPyf1IWZCpK64; dpr=2; _fbp=fb.1.1610132370255.1168812619; sb=0bj4X4_X31YtXgXhZiLxpdV4; m_pixel_ratio=2; locale=ru_RU; fr=0NN0EQsFk5qxmAySO.AWX7L3rjuhGpZFudBK7kLqYkM68.Bf-Kz9.e3.F_7.0.0.Bf-3YO.AWXU8E9nlsA; wd=1027x980" ^
--data-raw "av=0^&__user=0^&__a=1^&__dyn=7xe6HwkEowBwRyWwHBWo2vwAxu13wvoKewSwMwNw9G2S0wE2ywUx609vCwjE1xoswaq0woy1Qw5MKdwGwFyE2ly87e2l0FG1Cwc61uwPyoaoaU5q4Uqw8y4UaEW2C1OwwwJK2W2K0zK5o4q0Gogxq^&__csr=^&__req=d^&__beoa=0^&__pc=EXP1^%^3Acomet_pkg^&dpr=2^&__ccg=EXCELLENT^&__rev=1003171334^&__s=4sbu09^%^3Abxyrlz^%^3Az811lj^&__hsi=6916251618876813947-0^&__comet_req=1^&lsd=AVppvqWXB_A^&jazoest=21007^&__spin_r=1003171334^&__spin_b=trunk^&__spin_t=1610315316^&fb_api_caller_class=RelayModern^&fb_api_req_friendly_name=CometMarketplaceSearchContentPaginationQuery^&variables=^%^7B^%^22count^%^22^%^3A24^%^2C^%^22cursor^%^22^%^3A^%^22^%^7B^%^5C^%^22pg^%^5C^%^22^%^3A0^%^2C^%^5C^%^22cf^%^5C^%^22^%^3A^%^7B^%^5C^%^22basic^%^5C^%^22^%^3A^%^7B^%^5C^%^22item_index^%^5C^%^22^%^3A27^%^7D^%^2C^%^5C^%^22ads^%^5C^%^22^%^3A^%^7B^%^5C^%^22items_since_last_ad^%^5C^%^22^%^3A24^%^2C^%^5C^%^22items_retrieved^%^5C^%^22^%^3A24^%^2C^%^5C^%^22ad_index^%^5C^%^22^%^3A0^%^2C^%^5C^%^22ad_slot^%^5C^%^22^%^3A3^%^2C^%^5C^%^22dynamic_gap_rule^%^5C^%^22^%^3A0^%^2C^%^5C^%^22counted_organic_items^%^5C^%^22^%^3A0^%^2C^%^5C^%^22average_organic_score^%^5C^%^22^%^3A0^%^2C^%^5C^%^22is_dynamic_gap_rule_set^%^5C^%^22^%^3Afalse^%^2C^%^5C^%^22first_organic_score^%^5C^%^22^%^3A0^%^2C^%^5C^%^22is_dynamic_initial_gap_set^%^5C^%^22^%^3Afalse^%^2C^%^5C^%^22iterated_organic_items^%^5C^%^22^%^3A21^%^2C^%^5C^%^22top_organic_score^%^5C^%^22^%^3A0^%^2C^%^5C^%^22feed_slice_number^%^5C^%^22^%^3A1^%^2C^%^5C^%^22feed_retrieved_items^%^5C^%^22^%^3A24^%^2C^%^5C^%^22ad_req_id^%^5C^%^22^%^3A0^%^2C^%^5C^%^22refresh_ts^%^5C^%^22^%^3A0^%^2C^%^5C^%^22cursor_id^%^5C^%^22^%^3A17676^%^2C^%^5C^%^22mc_id^%^5C^%^22^%^3A0^%^7D^%^2C^%^5C^%^22boosted_ads^%^5C^%^22^%^3A^%^7B^%^5C^%^22items_since_last_ad^%^5C^%^22^%^3A0^%^2C^%^5C^%^22items_retrieved^%^5C^%^22^%^3A24^%^2C^%^5C^%^22ad_index^%^5C^%^22^%^3A0^%^2C^%^5C^%^22ad_slot^%^5C^%^22^%^3A0^%^2C^%^5C^%^22dynamic_gap_rule^%^5C^%^22^%^3A0^%^2C^%^5C^%^22counted_organic_items^%^5C^%^22^%^3A0^%^2C^%^5C^%^22average_organic_score^%^5C^%^22^%^3A0^%^2C^%^5C^%^22is_dynamic_gap_rule_set^%^5C^%^22^%^3Afalse^%^2C^%^5C^%^22first_organic_score^%^5C^%^22^%^3A0^%^2C^%^5C^%^22is_dynamic_initial_gap_set^%^5C^%^22^%^3Afalse^%^2C^%^5C^%^22iterated_organic_items^%^5C^%^22^%^3A0^%^2C^%^5C^%^22top_organic_score^%^5C^%^22^%^3A0^%^2C^%^5C^%^22feed_slice_number^%^5C^%^22^%^3A0^%^2C^%^5C^%^22feed_retrieved_items^%^5C^%^22^%^3A0^%^2C^%^5C^%^22ad_req_id^%^5C^%^22^%^3A0^%^2C^%^5C^%^22refresh_ts^%^5C^%^22^%^3A0^%^2C^%^5C^%^22cursor_id^%^5C^%^22^%^3A24928^%^2C^%^5C^%^22mc_id^%^5C^%^22^%^3A0^%^7D^%^2C^%^5C^%^22lightning^%^5C^%^22^%^3A^%^7B^%^5C^%^22initial_request^%^5C^%^22^%^3Afalse^%^2C^%^5C^%^22top_unit_item_ids^%^5C^%^22^%^3Anull^%^2C^%^5C^%^22ranking_signature^%^5C^%^22^%^3Anull^%^2C^%^5C^%^22qid^%^5C^%^22^%^3Anull^%^7D^%^7D^%^2C^%^5C^%^22rcf^%^5C^%^22^%^3A^%^7B^%^5C^%^22basic^%^5C^%^22^%^3A^%^7B^%^5C^%^22item_index^%^5C^%^22^%^3A0^%^7D^%^2C^%^5C^%^22ads^%^5C^%^22^%^3A^%^7B^%^5C^%^22items_since_last_ad^%^5C^%^22^%^3A0^%^2C^%^5C^%^22items_retrieved^%^5C^%^22^%^3A0^%^2C^%^5C^%^22ad_index^%^5C^%^22^%^3A0^%^2C^%^5C^%^22ad_slot^%^5C^%^22^%^3A0^%^2C^%^5C^%^22dynamic_gap_rule^%^5C^%^22^%^3A0^%^2C^%^5C^%^22counted_organic_items^%^5C^%^22^%^3A0^%^2C^%^5C^%^22average_organic_score^%^5C^%^22^%^3A0^%^2C^%^5C^%^22is_dynamic_gap_rule_set^%^5C^%^22^%^3Afalse^%^2C^%^5C^%^22first_organic_score^%^5C^%^22^%^3A0^%^2C^%^5C^%^22is_dynamic_initial_gap_set^%^5C^%^22^%^3Afalse^%^2C^%^5C^%^22iterated_organic_items^%^5C^%^22^%^3A0^%^2C^%^5C^%^22top_organic_score^%^5C^%^22^%^3A0^%^2C^%^5C^%^22feed_slice_number^%^5C^%^22^%^3A0^%^2C^%^5C^%^22feed_retrieved_items^%^5C^%^22^%^3A0^%^2C^%^5C^%^22ad_req_id^%^5C^%^22^%^3A0^%^2C^%^5C^%^22refresh_ts^%^5C^%^22^%^3A0^%^2C^%^5C^%^22cursor_id^%^5C^%^22^%^3A60631^%^2C^%^5C^%^22mc_id^%^5C^%^22^%^3A0^%^7D^%^2C^%^5C^%^22boosted_ads^%^5C^%^22^%^3A^%^7B^%^5C^%^22items_since_last_ad^%^5C^%^22^%^3A0^%^2C^%^5C^%^22items_retrieved^%^5C^%^22^%^3A0^%^2C^%^5C^%^22ad_index^%^5C^%^22^%^3A0^%^2C^%^5C^%^22ad_slot^%^5C^%^22^%^3A0^%^2C^%^5C^%^22dynamic_gap_rule^%^5C^%^22^%^3A0^%^2C^%^5C^%^22counted_organic_items^%^5C^%^22^%^3A0^%^2C^%^5C^%^22average_organic_score^%^5C^%^22^%^3A0^%^2C^%^5C^%^22is_dynamic_gap_rule_set^%^5C^%^22^%^3Afalse^%^2C^%^5C^%^22first_organic_score^%^5C^%^22^%^3A0^%^2C^%^5C^%^22is_dynamic_initial_gap_set^%^5C^%^22^%^3Afalse^%^2C^%^5C^%^22iterated_organic_items^%^5C^%^22^%^3A0^%^2C^%^5C^%^22top_organic_score^%^5C^%^22^%^3A0^%^2C^%^5C^%^22feed_slice_number^%^5C^%^22^%^3A0^%^2C^%^5C^%^22feed_retrieved_items^%^5C^%^22^%^3A0^%^2C^%^5C^%^22ad_req_id^%^5C^%^22^%^3A0^%^2C^%^5C^%^22refresh_ts^%^5C^%^22^%^3A0^%^2C^%^5C^%^22cursor_id^%^5C^%^22^%^3A43587^%^2C^%^5C^%^22mc_id^%^5C^%^22^%^3A0^%^7D^%^2C^%^5C^%^22lightning^%^5C^%^22^%^3A^%^7B^%^5C^%^22initial_request^%^5C^%^22^%^3Atrue^%^2C^%^5C^%^22top_unit_item_ids^%^5C^%^22^%^3Anull^%^2C^%^5C^%^22ranking_signature^%^5C^%^22^%^3Anull^%^2C^%^5C^%^22qid^%^5C^%^22^%^3Anull^%^7D^%^7D^%^2C^%^5C^%^22ncfp^%^5C^%^22^%^3Afalse^%^2C^%^5C^%^22ncfr^%^5C^%^22^%^3Afalse^%^2C^%^5C^%^22cfrh^%^5C^%^22^%^3Atrue^%^7D^%^22^%^2C^%^22params^%^22^%^3A^%^7B^%^22bqf^%^22^%^3A^%^7B^%^22callsite^%^22^%^3A^%^22COMMERCE_MKTPLACE_SEO^%^22^%^2C^%^22query^%^22^%^3A^%^22^%^22^%^7D^%^2C^%^22browse_request_params^%^22^%^3A^%^7B^%^22commerce_enable_local_pickup^%^22^%^3Atrue^%^2C^%^22commerce_enable_shipping^%^22^%^3Atrue^%^2C^%^22commerce_search_and_rp_category_id^%^22^%^3A^%^5B1792291877663080^%^5D^%^2C^%^22commerce_search_and_rp_condition^%^22^%^3Anull^%^2C^%^22commerce_search_and_rp_ctime_days^%^22^%^3Anull^%^2C^%^22filter_location_latitude^%^22^%^3A59.416809082031^%^2C^%^22filter_location_longitude^%^22^%^3A24.746704101562^%^2C^%^22filter_price_lower_bound^%^22^%^3A0^%^2C^%^22filter_price_upper_bound^%^22^%^3A214748364700^%^2C^%^22filter_radius_km^%^22^%^3A60^%^7D^%^2C^%^22custom_request_params^%^22^%^3A^%^7B^%^22contextual_filters^%^22^%^3A^%^5B^%^5D^%^2C^%^22saved_search_strid^%^22^%^3Anull^%^2C^%^22search_vertical^%^22^%^3Anull^%^2C^%^22seo_url^%^22^%^3A^%^22electronics^%^22^%^2C^%^22surface^%^22^%^3A^%^22TOPIC_PAGE^%^22^%^2C^%^22virtual_contextual_filters^%^22^%^3A^%^5B^%^5D^%^7D^%^7D^%^2C^%^22scale^%^22^%^3A2^%^7D^&server_timestamps=true^&doc_id=3567754026643659" ^
--compressed
// Generated by curl-to-PHP: http://incarnate.github.io/curl-to-php/
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://www.facebook.com/api/graphql/');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');
curl_setopt($ch, CURLOPT_ENCODING, 'gzip, deflate');
$headers = array();
$headers[] = 'Authority: www.facebook.com';
$headers[] = 'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.141 Safari/537.36 Edg/87.0.664.75';
$headers[] = 'Content-Type: application/x-www-form-urlencoded';
$headers[] = 'Accept: */*';
$headers[] = 'Origin: https://www.facebook.com';
$headers[] = 'Sec-Fetch-Site: same-origin';
$headers[] = 'Sec-Fetch-Mode: cors';
$headers[] = 'Sec-Fetch-Dest: empty';
$headers[] = 'Referer: https://www.facebook.com/marketplace/category/electronics';
$headers[] = 'Accept-Language: ru,en;q=0.9,en-GB;q=0.8,en-US;q=0.7,et;q=0.6';
$headers[] = 'Cookie: datr=2qr4X0nrqkswPyf1IWZCpK64; dpr=2; _fbp=fb.1.1610132370255.1168812619; sb=0bj4X4_X31YtXgXhZiLxpdV4; m_pixel_ratio=2; locale=ru_RU; wd=1027x980; fr=0NN0EQsFk5qxmAySO.AWVHtweNVyFUENvAfXKAHzfAYoE.Bf-Kz9.e3.F_7.0.0.Bf-3g6.AWUblK8R-28';
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
$result = curl_exec($ch);
if (curl_errno($ch)) {
echo 'Error:' . curl_error($ch);
}
curl_close($ch);
<?php
$options = [
'http'=> [
'follow_location' => 1,
'user_agent' => 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.141 Safari/537.36 Edg/87.0.664.75',
]
];
$context = stream_context_create($options);
$url = "https://www.facebook.com/marketplace/category/electronics/";
$html = file_get_contents($url, false, $context);
echo $html;
?>
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://www.facebook.com/marketplace/106039436102339/electronics/?exact=false&sortBy=creation_time_descend');
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_COOKIEJAR, "cookies.txt");
curl_setopt($ch, CURLOPT_COOKIEFILE, "cookies.txt");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.141 Safari/537.36 Edg/87.0.664.75");
curl_setopt($ch, CURLOPT_REFERER, "http://www.facebook.com");
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);
$page = curl_exec($ch) or die(curl_error($ch));
echo $page;
?>
Sorry! Something went wrong :(
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://www.facebook.com/marketplace/106039436102339/electronics/?exact=false&sortBy=creation_time_descend');
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_COOKIEJAR, "cookies.txt");
curl_setopt($ch, CURLOPT_COOKIEFILE, "cookies.txt");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.141 Safari/537.36 Edg/87.0.664.75");
curl_setopt($ch, CURLOPT_REFERER, "http://www.facebook.com");
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);
$page = curl_exec($ch) or die(curl_error($ch));
echo $page;
Получаю ошибку: -- Value 97371448075184682046976726790084002229540073769885587621958501676634557492452 is too large to be a u64 value.
Из preview видно что это первый аргумент почему-то превращается в числовую строку...