You are here: Re: Automate access to password protected sites « PHP Programming Language « IT news, forums, messages
Re: Automate access to password protected sites

Posted by Alvaro G. Vicario on 01/26/06 00:30

*** Darren escribió/wrote (24 Jan 2006 09:11:48 -0800):
> we're fully paid up and signed up to a password protected site, so this
> isn't hacking. In this site we can download a price list in CSV
> format.
>
> What I'd like to do is have a PHP script log into the site and download
> the CSV file so we can then display it on our website.

In this case I'd normally do a system() call and use wget (if available).
It takes care itself of all the dirty details.

wget --help

[...]

HTTP options:
--http-user=USER set http user to USER.
--http-passwd=PASS set http password to PASS.

If the site is not using HTTP authentication, though, you'd need to send
the login form data and probably create a cookie. The right tool is curl.

--
-+ Álvaro G. Vicario - Burgos, Spain
++ http://bits.demogracia.com es mi sitio para programadores web
+- http://www.demogracia.com es mi web de humor libre de cloro
--

 

Navigation:

[Reply to this 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

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