Answer the question
In order to leave comments, you need to log in
How to send a search request to the steam market?
Good afternoon, there is a problem with sending a correct request (?query =)
When $name contains Russian characters, it returns in response: There were no items matching your search. Try again with different keywords.
When I send the same request with a butterfly in English, everything is fine.
What is the correct way to handle $name before sending?
<?php
$name='бабочка';
$url='https://steamcommunity.com/market/search/render/?query='.$name.'&start=0&count=100&search_descriptions=0&sort_column=popular&sort_dir=desc&appid=730';
echo file_get_contents($url);
?>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question