How to run Google's 'site: blah.com' commando and capture 10 links in a textarea?

Hi Folks,

I want to know how to run the site: blah.com commando from within PHP and capture the first 10 links in a textarea.

If you need more info, please ask,

Kind regards,

Dweep
PeterdeBAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Loganathan NatarajanLAMP DeveloperCommented:
how to run the site: blah.com commando from within PHP

>> what do you mean? please more details
0
PeterdeBAuthor Commented:
Now when you type in the search engine bar: site:google.com you get all pages with google.com in it. Now I want to run that from within php.

Dweep



0
Loganathan NatarajanLAMP DeveloperCommented:
you mean the sub domains or like www.some-domain.google.com
0
Cloud Class® Course: Ruby Fundamentals

This course will introduce you to Ruby, as well as teach you about classes, methods, variables, data structures, loops, enumerable methods, and finishing touches.

PeterdeBAuthor Commented:
Ehm not the sub domains. But just some-domain > site: some-domain.com will result in all links with some-domain in it.

Dweep
0
netmunkyCommented:
technically, this is against google's terms of service, and they do monitor traffic to block violators (grabbing X number of automated queries in Y amount of time results in a 24 hours ban from google for your IP)

if you decide to ignore their TOS and do it anyways, you can use curl functions to get the content of the page, then you'll need to use regular expressions to find the links
http://us.php.net/curl
http://us.php.net/preg_match
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
PeterdeBAuthor Commented:
Thanks a lot mate, I had no idea it was against their policies!
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
PHP

From novice to tech pro — start learning today.