fopen - how to get a site with login

This is a discussion on fopen - how to get a site with login within the PHP Language forums, part of the PHP Programming Forums category; I need to get some pages from a site that request user and passw Probably they use cookies How can ...


Go Back   Usenet Forums > PHP Programming Forums > PHP Language

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-28-2008
Feijó
 
Posts: n/a
Default fopen - how to get a site with login

I need to get some pages from a site that request user and passw

Probably they use cookies

How can I do that?
Reply With Quote
  #2 (permalink)  
Old 02-28-2008
Rik Wasmus
 
Posts: n/a
Default Re: fopen - how to get a site with login

On Thu, 28 Feb 2008 12:46:57 +0100, Feijó <afeijo@gmail.com> wrote:

> I need to get some pages from a site that request user and passw
>
> Probably they use cookies
>
> How can I do that?


CURL is your friend: http://nl2.php.net/curl
Especially read about the options set with curl_setopt()

If CURL isn't installed at your server, you'll either have to write your
own lofic using fsockopen(), and manually write & read (/interpret)
headers, or use one of the http client classes out there, for instance the
PEAR one: <http://pear.php.net/package/HTTP_Client>
--
Rik Wasmus
Reply With Quote
  #3 (permalink)  
Old 02-28-2008
Feijó
 
Posts: n/a
Default Re: fopen - how to get a site with login

Thanks Rik !

I'm building that on my own computer, with WinXP and Apache 2.2. I'm
sure if I dont have CURL, I can install it

I get back to the list if I enconter problems.


regards
Feijo

On Feb 28, 9:05 am, "Rik Wasmus" <luiheidsgoe...@hotmail.com> wrote:
> On Thu, 28 Feb 2008 12:46:57 +0100, Feijó <afe...@gmail.com> wrote:
> > I need to get some pages from a site that request user and passw

>
> > Probably they use cookies

>
> > How can I do that?

>
> CURL is your friend:http://nl2.php.net/curl
> Especially read about the options set with curl_setopt()
>
> If CURL isn't installed at your server, you'll either have to write your
> own lofic using fsockopen(), and manually write & read (/interpret)
> headers, or use one of the http client classes out there, for instance the
> PEAR one: <http://pear.php.net/package/HTTP_Client>
> --
> Rik Wasmus


Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 05:34 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0