how can i fetch files from another site

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • berehneh

    how can i fetch files from another site

    i wanna to catch html files from another web
    how can i do it?
  • NixoiD

    #2
    Re: how can i fetch files from another site

    On 26 Dec 2003 23:15:15 -0800, berehneh <fekr_e_berehne h@hotmail.com>
    wrote:
    [color=blue]
    > i wanna to catch html files from another web
    > how can i do it?[/color]
    yes.
    $fp = fopen("http://site.com/file.html","r") ;
    ....


    --
    --
    NixoiD || nixoid@km.ru || #xakep@icr.wene t.ru
    --
    Window$ for Desktop? LOL!..
    Using M2 on Slackware 9.1

    Comment

    • Senator Jay Billington Bulworth

      #3
      Re: how can i fetch files from another site

      In article <opr0t3gt1fr1d4 ra@news.alkar.n et>, NixoiD <nixoid@km.ru >
      wrote:
      [color=blue]
      > On 26 Dec 2003 23:15:15 -0800, berehneh <fekr_e_berehne h@hotmail.com>
      > wrote:
      >[color=green]
      > > i wanna to catch html files from another web
      > > how can i do it?[/color]
      > yes.
      > $fp = fopen("http://site.com/file.html","r") ;[/color]

      Or,

      $google = join('', file('http://google.com'));

      That's a one-liner so you don't have to do an fopen and fread/fgets.

      hth

      --
      Bulworth : funha@fung.arg | My email address is ROT13 encoded, decode to mail
      --------------------------|--------------------------------------------------
      <http://www.phplabs.com/> | PHP scripts and thousands of webmaster resources!

      Comment

      • CountScubula

        #4
        Re: how can i fetch files from another site

        fekr_e_berehneh @hotmail.com (berehneh) wrote in message news:<42c4d1c9. 0312262315.271a 842a@posting.go ogle.com>...[color=blue]
        > i wanna to catch html files from another web
        > how can i do it?[/color]

        returns an array
        $webPage = file("http://www.site.com");


        or return a sting
        $webPage = implode("","htt p://www.site.com");



        Mike Bradley
        http://gzen.myhq.info -- free online php tools

        Comment

        • Chung Leong

          #5
          Re: how can i fetch files from another site

          Shorter still: $google = file_get_conten ts(http://www.google.com/);

          Uzytkownik "Senator Jay Billington Bulworth" <funha@fung.arg > napisal w
          wiadomosci
          news:funha-15542C.03162428 122003@news-server-fe-01.columbus.rr. com...[color=blue]
          > In article <opr0t3gt1fr1d4 ra@news.alkar.n et>, NixoiD <nixoid@km.ru >
          > wrote:
          >[color=green]
          > > On 26 Dec 2003 23:15:15 -0800, berehneh <fekr_e_berehne h@hotmail.com>
          > > wrote:
          > >[color=darkred]
          > > > i wanna to catch html files from another web
          > > > how can i do it?[/color]
          > > yes.
          > > $fp = fopen("http://site.com/file.html","r") ;[/color]
          >
          > Or,
          >
          > $google = join('', file('http://google.com'));
          >
          > That's a one-liner so you don't have to do an fopen and fread/fgets.
          >
          > hth
          >
          > --
          > Bulworth : funha@fung.arg | My email address is ROT13 encoded, decode to[/color]
          mail[color=blue]
          > --------------------------|-----------------------------------------------[/color]
          ---[color=blue]
          > <http://www.phplabs.com/> | PHP scripts and thousands of webmaster[/color]
          resources!


          Comment

          • berehneh

            #6
            Re: how can i fetch files from another site

            but my probleme is that i wanna to cach from a page that have dynamic
            content like this :
            HSTS Redirection Community Customer Secure Login Page. Login to your HSTS Redirection Community Customer Account.

            and i wanna to cach it by php

            Comment

            • Ian.H

              #7
              Re: how can i fetch files from another site

              On Sun, 11 Jan 2004 00:43:44 -0800, berehneh wrote:
              [color=blue]
              > but my probleme is that i wanna to cach from a page that have dynamic
              > content like this :
              > http://site.com/default.asp
              > and i wanna to cach it by php[/color]


              Assuming your host permits fopen() and URL usage, open the page with
              fopen() and read the contents.



              Regards,

              Ian

              --
              Ian.H [Design & Development]
              digiServ Network - Web solutions
              www.digiserv.net | irc.digiserv.ne t | forum.digiserv. net
              Programming, Web design, development & hosting.

              Comment

              Working...