Re: ? in URLS.

From: Date: Fri, 24 Jan 2003 05:50:23 +0000
Subject: Re: ? in URLS.
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-132949@lists.php.net to get a copy of this message
Ok, ill explain my self further. the URL in the script is http://www.weatherzone.com.au/yourHomePage.jsp?ref=f2eeb571ed The script uses the URL to see the page and store it locally, then another script grabs selected data from that page. the stuff after the ? is essential for the data i want to be displayed, with out that part, the script only sees the base page without the data i need, so hence it doesn't grab it. so how do i use the $_GET['var1'] $_GET['var2'] $_GET['var3'] or urlencode() in the script this is the script. <?php //Writing of local file $rContents = implode( "\r\n", file( 'http://www.weatherzone.com.au/yourHomePage.jsp?ref=f2eeb571ed' ) ); if( ($fp = fopen( 'wztest.txt', 'wb+' )) !== false ) { fputs( $fp, $rContents ); fclose( $fp ); } ?> -- Cheers --------------------------------- Simon Angell Canberra, ACT www.canberra-wx.com --------------------------------------------- Proud member of the Australian Severe Weather Association. www.severeweather.asn.au -------------------------------------------------------------- "Marek Kilimajer" <kilimajer@webglobe.sk> wrote in message news:3E302FE0.9090605@webglobe.sk... > use urlencode() > > Simon Angell wrote: > > >Hi All. > >I am currently playing with sripts, and have come across a problem, that i > >can't slove. (i am a novice - lol). > >The script requires a URL to grab data from. The URL has a ? in it, and > >testing the script it grabs the base data of the URL, but not the essential > >data i need, which is only brought up with what comes after the ? in the > >URL. now i figure it has something to do with the ? in the URL but i can't > >seem to fix it myself. > > > >Thanks > > > >-- > > > >Cheers > >--------------------------------- > >Simon Angell > >Canberra, ACT > >www.canberra-wx.com > >--------------------------------------------- > >Proud member of the > >Australian Severe Weather Association. > >www.severeweather.asn.au > >-------------------------------------------------------------- > > > > > > > > > > >

« previous php.general (#132949) next »