?
Solved

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

Posted on 2008-02-02
6
Medium Priority
?
237 Views
Last Modified: 2010-04-21
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
0
Comment
Question by:PeterdeB
  • 3
  • 2
6 Comments
 
LVL 36

Expert Comment

by:Loganathan Natarajan
ID: 20804787
how to run the site: blah.com commando from within PHP

>> what do you mean? please more details
0
 

Author Comment

by:PeterdeB
ID: 20804826
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
 
LVL 36

Expert Comment

by:Loganathan Natarajan
ID: 20804845
you mean the sub domains or like www.some-domain.google.com
0
Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

 

Author Comment

by:PeterdeB
ID: 20804948
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
 
LVL 8

Accepted Solution

by:
netmunky earned 2000 total points
ID: 20805418
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
 

Author Closing Comment

by:PeterdeB
ID: 31427478
Thanks a lot mate, I had no idea it was against their policies!
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
There are times when I have encountered the need to decompress a response from a PHP request. This is how it's done, but you must have control of the request and you can set the Accept-Encoding header.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
Suggested Courses

588 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question