mr_zhang Posted September 2, 2006 Share Posted September 2, 2006 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. Link to comment https://forums.phpfreaks.com/topic/19447-solved-go-to-url-and-take-some-info/ Share on other sites More sharing options...
Orio Posted September 2, 2006 Share Posted September 2, 2006 You should be looking into [url=http://www.php.net/curl/]cURL[/url].You can find some tutorials in this topic:http://www.phpfreaks.com/forums/index.php/topic,105640.msg422079.htmlOrio. Link to comment https://forums.phpfreaks.com/topic/19447-solved-go-to-url-and-take-some-info/#findComment-84489 Share on other sites More sharing options...
mr_zhang Posted September 3, 2006 Author Share Posted September 3, 2006 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. Link to comment https://forums.phpfreaks.com/topic/19447-solved-go-to-url-and-take-some-info/#findComment-85022 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.