tags:

views:

85

answers:

5

How to get a website information through PHP.

Not using

file_get_contents

Is there any other way to get the website information.

example URL: http://www.quarkbase.com/google.com

In this page you will get whole information about the GOOGLE page. Like this If i enter any URL of a site i need to get the More information regarding that site.

I hope the query is very clear.

Let me know if you have any doubts regarding query

Thanks n advance

Fero

+1  A: 

look at the curl functions.

php.net has a basic example.

Lance Rushing
A: 

cURL won't solve his problem. It can perhaps help him take a screenshot of the website, but their information regarding the URL comes from a plethora of sources. Traffic info comes from Alexa, they get social networking stats from the relevant websites, and any information about the company running the website they either get from a separate database, or they have employees entering information about the larger websites they index.

There is no way to discern that type of information simply by reading the source of the page. They use tons of algorithms to search the page's contents for patterns, they use Alexa's API to get its usage data, they use the APIs of the social networking services to mine data from them, etc.

It's definitely not an easy task...

BraedenP
Hi Braeden, Will you guide me to solve this issue. as i am a beginner i need some experts help... Will you?
Fero
A: 

So..by website information, you mean registrar and domain information? Like through dnsstuff.com or other meta information about a company owning that domain.

Automated scraping of many of those kinds of data can be tricky. Not only do you need to get that info from a few places, but many of those places will block you if they find you not obeying their robots.txt.

You need to make a more precise list of the things you want to collect. Google for "dns tools" and you'll find things like http://dnsstuff.com that will lead you closer to getting this information. Sometimes you have to go to registrars like networksolutins.com to get the info as well. Also, look into the unix whois command, and the unix dig command.

memnoch_proxy
Hi memnoch_procy.. I didn't need file_get_contents(). Because it doesn't do what i want... I need these registrar and domain information too. is that possible to do ? I gave an example site there. I just need the website description, logo, and registrar and domain information. Kindly help me out of this issue
Fero
+1  A: 

You may want to check out the f*() functions ported from C.

They allow for finer stream manipulation.

Some good tips here.

$handle = fopen( "http://www.quarkbase.com/google.com/", "r", false, $context );
$text = '';
while ( !feof( $handle ) )
    $text .= fread( $handle, 8192 );
fclose( $handle );
Yada
A: 

Not sure I understand completely what 'website information' you are trying to gather, but perhaps http://builtwith.com will get you closer ?

Scott Evernden
i don't need all the information like the above site... if you are familiar with FACE BOOK you should know about LINK module. I need that exactly to integrate in to one of my site...
Fero