How do apply Twitter Adv search string to in json format?


Currently my code retrieves search results flawlessly then simple terms (parameters) are used.

The code is:
$decode = json_decode(file_get_contents(‘’. $search_string));

$search_string = “what’s%20for%20lunch” //works

$search_string = “%22what’s%20for%20lunch%22%20near%3A%2275024%22%20within%3A5mi%20%3F” // {“error”:“Invalid parameter”}

I pulled the above string by using an advanced search on twitter that included miles from a geographic location.

Note: the advanced string works fine when used at!/search/