Jump to content


This topic is now archived and is closed to further replies.


[SOLVED] Go to Url and take some info

Recommended Posts

Hi guys,

I'm new to this forum. I've tried to search but can't seem to get the answer. So, I'm posting this.

I have 2 web servers on 2 domains. Let's say server A and B. Server A has database and a kind of search the db function. Server B doesn't have it. However, I want to create a script on server B that ables to:
- go to server A.
- Run a search
- Get only partial data from the result form.

I don't want server B to have a function to access DB at server A as I'm going to share the script to several people. I don't want them to have full search result.

To make it easier for you to understand. Let's pretend that I want to get data from Google. I don't have access to Google's DB but I can search and get, e.g., the total number of websites (it's the xxx of the "1 to 10 of xxx"). How can I get the number?

What I can't do are:
- Go to a certain url while still being on my server. So it's not like header go to. I guess.
- Put some string on the search box and simulate the pressing of the "search" button.
- Get the data. Do I have to manually search character by character or is there any faster method?

I'm hoping somebody could give me example how to take the xxx of the "1 to 10 of xxx" from Google. Then put the number on the same page at my server. From there I guess I can do the rest with my own server.

Thank you.

Share this post

Link to post
Share on other sites
You should be looking into [url=http://www.php.net/curl/]cURL[/url].

You can find some tutorials in this topic:


Share this post

Link to post
Share on other sites
Thanks Orio.

It's just what I need. :)

I guess it also enables me to do POST action. I'll try it.
It seems that I can only manually edit the strings character by character huh.

Thanks again.

Share this post

Link to post
Share on other sites


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.