Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v1 - local search issue #24

Closed
sameerpanjwani opened this issue Dec 28, 2015 · 2 comments
Closed

v1 - local search issue #24

sameerpanjwani opened this issue Dec 28, 2015 · 2 comments

Comments

@sameerpanjwani
Copy link

For some parameters like uule that we need to pass to Google for search, they should not be urlencoded because then the value is lost. Since you're using http_build_query for your parameters, this particular parameter's value is being converted wrongly.

Example:
$googleUrl->setLang('en')->setNumberResults(10)->setTld("co.in")->setParam("uule","w+CAIQICIJTmV3IERlbGhp");

Ideally it should call
https://www.google.co.in/search?lr=lang_en&hl=en&q=chinese+restaurants&complete=0&pws=0&uule=w+CAIQICIJTmV3IERlbGhp but it converts the "+" sign and that results in a wrong search in Google. So perhaps you need a function called, setRawParam which is then appended in it's raw form at the end of the built query.

@gsouf
Copy link
Owner

gsouf commented Dec 28, 2015

I see the problem.

setRawParam looks to be good solution, though I have to use the proper solution to implement it.

I the interim you can replace you setParam call with:

->setParam("uule",urldecode("w+CAIQICIJTmV3IERlbGhp"));

I didnt give it a try but that should work.

gsouf added a commit that referenced this issue Dec 30, 2015
@gsouf
Copy link
Owner

gsouf commented Dec 30, 2015

setRawParam was implemented in version 1.1.0

@gsouf gsouf closed this as completed Dec 30, 2015
@gsouf gsouf mentioned this issue Jan 16, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants