KyZu Posted May 15, 2011 Share Posted May 15, 2011 There's this really old website called http://ipolygraph.com/google/ Basically it mimics the Google homepage (as you can see it's been a while since they've updated) but the idea is really simple but clever. If you go to the search box and type cars (or whatever) and click search, it searches Google for "cars". However if you type something like /php manual/ you'll notice it changes what you're searching to "What is...etc etc". The idea is say you tell your friend you're on Google and you ask them to think of a card, if you type /4c/ is bob thinking of? it'll look as if you're typing "What is Bob thinking of?", when you hit search it'll be the 4 of clubs. Is there any way to make something similar to this? The idea came to me after I learned about the file_get_contents command in PHP. Quote Link to comment Share on other sites More sharing options...
r0b Posted May 16, 2011 Share Posted May 16, 2011 Just trying to understand what's happening here. I've been trying all sorts to get the result you asked in the search bar, but it's not working for me. Whether I type "/php manual/" or "/4c/ is bob thinking of?" (without the "" of course), I see no difference in the google results. Any other special characters you put in? Quote Link to comment Share on other sites More sharing options...
dcro2 Posted May 16, 2011 Share Posted May 16, 2011 I got it to work, but the effect seems to be coded in Flash, not PHP or anything. You couldn't really do this in PHP alone. You'd have to use at least Javascript in addition to PHP. And still, I'm wondering why exactly you thought of file_get_contents? Quote Link to comment Share on other sites More sharing options...
Zane Posted May 16, 2011 Share Posted May 16, 2011 dcro2 is right, the only way to mimic this would be in Javascript and I have to say, I don't understand why you would want such a feature. It's as if you're making a phishing scam for the visually impaired.... or the visually careless and ignorant. Who in their right mind would type /php manual/ ...., see "What is bob thinking of" and hit Enter or click Search? This sounds like a way to prey on someone's ignorance IMO. Quote Link to comment Share on other sites More sharing options...
KyZu Posted May 16, 2011 Author Share Posted May 16, 2011 haha sorry guys, I'm not trying to scam anybody, I just found it interesting and was trying to see what's possible (it's my 2nd week learning). Who in their right mind would type /php manual/ ...., see "What is bob thinking of" and hit Enter or click Search? This sounds like a way to prey on someone's ignorance IMO. It was just a random example, the site is basically a magic trick. So if you're at school and you tell someone to think of a card, and they say seven of hearts, you'd simply type "/7h/ is Zanus thinking of?" into what appears to be Google but actually displays the card they're thinking of. Anyways thanks for the help guys Quote Link to comment Share on other sites More sharing options...
ted_chou12 Posted May 16, 2011 Share Posted May 16, 2011 PHP only process information "after" you submit a page, or "before" you load a page. Only javascript allows dynamic page, so that is javascript, not PHP. If you right click on the search box, you can definitely see its flash. It might even be a bit difficult with javascript Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.