RE: [PHP] ? in URLS.
| From: | Martin Towell | Date: | Fri, 24 Jan 2003 05:56:08 +0000 |
| Subject: | RE: [PHP] ? in URLS. | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-132950@lists.php.net to get a copy of this message | ||
if it's just the string after the ? then use $QUERY_STRING
can't remember which $_* variable it's under...
HTH
> -----Original Message-----
> From: Simon Angell [mailto:simon@canberra-wx.com]
> Sent: Friday, January 24, 2003 4:50 PM
> To: php-general@lists.php.net
> Subject: Re: [PHP] ? in URLS.
>
>
> 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
> > >--------------------------------------------------------------
> > >
> > >
> > >
> > >
> > >
> >
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>