how it returns the result,when the user click "submit query" button?
get the result
Moderator: General Moderators
-
everydayrun
- Forum Commoner
- Posts: 51
- Joined: Wed Jan 20, 2010 1:30 am
get the result
Take a look at this tool,
-
klevis miho
- Forum Contributor
- Posts: 413
- Joined: Wed Oct 29, 2008 2:59 pm
- Location: Albania
- Contact:
Re: get the result
What is your problem?
-
everydayrun
- Forum Commoner
- Posts: 51
- Joined: Wed Jan 20, 2010 1:30 am
Re: get the result
how to make the database that returns the result.klevis miho wrote:What is your problem?
-
klevis miho
- Forum Contributor
- Posts: 413
- Joined: Wed Oct 29, 2008 2:59 pm
- Location: Albania
- Contact:
Re: get the result
There is no need to make a database at all
-
everydayrun
- Forum Commoner
- Posts: 51
- Joined: Wed Jan 20, 2010 1:30 am
Re: get the result
confused! if there is no a database, where and how i can get the result?could you give me more details?thank youklevis miho wrote:There is no need to make a database at all
-
klevis miho
- Forum Contributor
- Posts: 413
- Joined: Wed Oct 29, 2008 2:59 pm
- Location: Albania
- Contact:
Re: get the result
Try to search on bing.com like this ip:your-website-ip.
It displays a list of websites that are on your websites IP.
Then you would use php's cURL library to get the pages that bing.com displays.
Then using some regular expressions you would get the domains that bing.com displays.
Then you would print the catched domains.
It displays a list of websites that are on your websites IP.
Then you would use php's cURL library to get the pages that bing.com displays.
Then using some regular expressions you would get the domains that bing.com displays.
Then you would print the catched domains.
-
everydayrun
- Forum Commoner
- Posts: 51
- Joined: Wed Jan 20, 2010 1:30 am
Re: get the result
but the input by the vistor is the domain name not an ip,how to change the ip into domain name?klevis miho wrote:Try to search on bing.com like this ip:your-website-ip.
It displays a list of websites that are on your websites IP.
Then you would use php's cURL library to get the pages that bing.com displays.
Then using some regular expressions you would get the domains that bing.com displays.
Then you would print the catched domains.
-
klevis miho
- Forum Contributor
- Posts: 413
- Joined: Wed Oct 29, 2008 2:59 pm
- Location: Albania
- Contact:
Re: get the result
Use this:
$ip = gethostbyname('www.example.com');
$ip = gethostbyname('www.example.com');
-
everydayrun
- Forum Commoner
- Posts: 51
- Joined: Wed Jan 20, 2010 1:30 am
Re: get the result
klevis miho wrote:Use this:
$ip = gethostbyname('www.example.com');
Code: Select all
<?php
$ip = gethostbyname('$_POST['input']');
echo $ip;
?>
do you know how does this site(http://www.sitesonmyip.com/) do?
-
klevis miho
- Forum Contributor
- Posts: 413
- Joined: Wed Oct 29, 2008 2:59 pm
- Location: Albania
- Contact:
Re: get the result
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'http://www.bing.com/search?q=ip%3A'.$ip ... p=1&sc=8-0');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$contents = curl_exec ($ch);
curl_close ($ch);
You could do a echo $contents; to see what you have catched.
After that you should use a regular expression to get only the domain.
curl_setopt($ch, CURLOPT_URL, 'http://www.bing.com/search?q=ip%3A'.$ip ... p=1&sc=8-0');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$contents = curl_exec ($ch);
curl_close ($ch);
You could do a echo $contents; to see what you have catched.
After that you should use a regular expression to get only the domain.
-
everydayrun
- Forum Commoner
- Posts: 51
- Joined: Wed Jan 20, 2010 1:30 am
Re: get the result
i am sorry,when i copied and run this code .there was nothing that i catched. what this 'http://www.bing.com/search?q=ip%3A'.$ip ... p=1&sc=8-0' mean? thank you.klevis miho wrote:$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'http://www.bing.com/search?q=ip%3A'.$ip ... p=1&sc=8-0');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$contents = curl_exec ($ch);
curl_close ($ch);
You could do a echo $contents; to see what you have catched.
After that you should use a regular expression to get only the domain.
-
klevis miho
- Forum Contributor
- Posts: 413
- Joined: Wed Oct 29, 2008 2:59 pm
- Location: Albania
- Contact:
Re: get the result
Look:
http://www.bing.com/search?q=ip%3A66.14 ... p=1&sc=8-3
This address gives you the domains that are on the 66.147.240.97 ip.
http://www.bing.com/search?q=ip%3A66.14 ... p=1&sc=8-3
This address gives you the domains that are on the 66.147.240.97 ip.
-
everydayrun
- Forum Commoner
- Posts: 51
- Joined: Wed Jan 20, 2010 1:30 am
Re: get the result
sorry,this is inputted by the vistor,how to make it dynamicly nor fixed.klevis miho wrote:Look:
http://www.bing.com/search?q=ip%3A66.14 ... p=1&sc=8-3
This address gives you the domains that are on the 66.147.240.97 ip.
-
klevis miho
- Forum Contributor
- Posts: 413
- Joined: Wed Oct 29, 2008 2:59 pm
- Location: Albania
- Contact:
Re: get the result
Put the variable $ip instead of a fixed ip.
-
everydayrun
- Forum Commoner
- Posts: 51
- Joined: Wed Jan 20, 2010 1:30 am
Re: get the result
Code: Select all
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'http://www.bing.com/search?q=ip%3A'.$ip.'&form=QBLH&qs=HS&sk=&pq=&sp=1&sc=8-0');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$contents = curl_exec ($ch);
curl_close ($ch);
echo $contents;