D
D
Danila2020-04-02 14:05:43
PHP
Danila, 2020-04-02 14:05:43

How to send a request with a tag and get a response?

How to get data from a page with tag #p{номер страницы}_popular_desc?
Through file_get_contentssending a request to

https://steamcommunity.com/market/search?appid=730#p5_popular_desc
but the answer comes with the 1st page, i.e. the function does not read the tag. How to fix it?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
J
Just A Bit, 2020-04-08
@FunnyDev

file_get_contents can't handle #. Steam also uses an AJAX request and returns JSON for your request. The correct URL will be:
https://steamcommunity.com/market/search/render/?q...
I think you will figure it out yourself with the parameters.
It really depends on what you want. If you parse, for example, all prices or items, then you will either need to use a proxy or third-party services. If interested, write, I will answer.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question