> I realize it's a stupid question but I need a simple solution.. I'd like
> to get contence from script-generated webpage (I send a regquest via get
> or post method to a page and it generates a response page - how do get
> that page as a string? Get the source of the page). It's obvious that it
> cannot be shown with file functions. Only solution I was mentioned vas
> CURL package but I'd like to solve this with standard functions. Is it
> possible?

fopen() can support streams, if your configuration allows it:
        http://php.net/manual/en/function.fopen.php

Alternatively, you can use the socket functions to hand-roll an HTTP
request, in the event that you need stricter control over POST contents or
specific headers.
        http://php.net/manual/en/ref.sockets.php

Or, if you're on a unix system, and curl's available as an executable, and
you consider exec to be a "standard" function, there's always this:
        $response = shell_exec("curl http://www.example.com";);

I always use last method that in preference to the curl functions.
I find them incredibly overengineered. :)

---------------------------------------------------------------------
michal migurski- contact info and pgp key:
sf/ca            http://mike.teczno.com/contact.html

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to