Reply to Re: Getting info from a website.

Your name:

Reply:


Posted by Andy Jeffries on 04/02/06 12:56

On Sun, 02 Apr 2006 01:22:03 -0800, Michael wrote:
> I have been doing PHP for over a year now but when I came round to writing
> a script I discovered that there was a reasonably sizeable gap in my
> knowledge that I didn't even know where to start finding out about. Anyway
> this is a reasonably nooby question:
>
> If I have a script on http://url-a.com/script.php and I want to get some
> dynamic information of my friend's site at http://url-b.com/info.php , How
> can I get it? I need to use get variables in getting it and it must also
> be server side.

You may be able to use fopen (depending on your hosts configuration) to
open remove sites, but an arguably better way is to use the curl_*
functions (start looking in the man page for curl_init).

You can pass in GET parameters to it either way by using the normal
"http://url-b.com/info.php?bar=1&foo=abc" format in either call.

Cheers,


Andy


--
Andy Jeffries MBCS CITP ZCE | gPHPEdit Lead Developer
http://www.gphpedit.org | PHP editor for Gnome 2
http://www.andyjeffries.co.uk | Personal site and photos

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация