LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 07-31-2001, 11:13 AM   #1
DJFauß
Member
 
Registered: May 2001
Location: Germany
Distribution: SuSE 8.1
Posts: 48

Rep: Reputation: 15
PHP -> parsing urls


I have to parse the url of the *.php3 to determine which frames to load. How do I parse the URL which called my *.php3?

Do I use the parse_url command or is there an easier way?

THX folks
 
Old 07-31-2001, 02:28 PM   #2
jharris
Senior Member
 
Registered: May 2001
Location: Bristol, UK
Distribution: Slackware, Fedora, RHES
Posts: 2,243

Rep: Reputation: 46
I don't follow your question. Parse the contents of all .php3 files looking for URLs??? Or parsing the referrer line URL within the http request??? And parse to gain what??

cheers

Jamie...
 
Old 07-31-2001, 02:49 PM   #3
DJFauß
Member
 
Registered: May 2001
Location: Germany
Distribution: SuSE 8.1
Posts: 48

Original Poster
Rep: Reputation: 15
I'm trying to have a menu that calls up the mainframe with parameters (like a procedure) ... the mainframe needs to load the appropriate subframes according to the http parameters given (the url looking like www.rgk-abi2000.de/index.php3&frame=news for loading the news site in a frameset).

Of course it'd be easier using Javascript for loading multiple frames in one link ... just some of my people can't use javascript on their browsers due to security restrictions ...
 
Old 07-31-2001, 02:52 PM   #4
jharris
Senior Member
 
Registered: May 2001
Location: Bristol, UK
Distribution: Slackware, Fedora, RHES
Posts: 2,243

Rep: Reputation: 46
So you just need to find the value of say the frame= pair in your previous example?

Jamie...
 
Old 08-01-2001, 08:26 AM   #5
glj
Member
 
Registered: Jul 2001
Location: London
Distribution: RH 9
Posts: 151

Rep: Reputation: 30
Is this what you mean?

if you need to post variables to a php file via the url, all you need to do is create a variable in the php file with the same name. i.e. if you put a variable called $frame in index.php, calling index.php?frame=news would put the value "news" in $frame. If you need more than one variable, just use the & in the url (e.g. index.php?frame=news&blahblah=rubbish

HTH

glj
 
Old 08-01-2001, 09:35 AM   #6
DJFauß
Member
 
Registered: May 2001
Location: Germany
Distribution: SuSE 8.1
Posts: 48

Original Poster
Rep: Reputation: 15
gee thx ... all I needed to know =)
 
Old 08-01-2001, 12:02 PM   #7
DJFauß
Member
 
Registered: May 2001
Location: Germany
Distribution: SuSE 8.1
Posts: 48

Original Poster
Rep: Reputation: 15
K I got one more question:

how do I open a specific URL in a new window?

just wanna have PHP code executing this in a function ... not something like an href
 
Old 08-02-2001, 04:35 AM   #8
glj
Member
 
Registered: Jul 2001
Location: London
Distribution: RH 9
Posts: 151

Rep: Reputation: 30
Quote:
not something like an href
Is that a question or a request?

If you want a page to open in a new windows (popup stylee) just put a target="<some non-existent frame>" in the href tag. Otherwise don't know what you mean!

glj

Last edited by glj; 08-02-2001 at 05:43 AM.
 
Old 08-02-2001, 09:14 AM   #9
DJFauß
Member
 
Registered: May 2001
Location: Germany
Distribution: SuSE 8.1
Posts: 48

Original Poster
Rep: Reputation: 15
I want to open the window by code ... not by having the user click a link - i know its possible wiht java using loadform ... just I cant use java ... so I'm looking for a PHP command

-> I'm missing a php compendium like SelfHTML for HTML ... =(

Last edited by DJFauß; 08-02-2001 at 09:28 AM.
 
Old 08-02-2001, 09:42 AM   #10
glj
Member
 
Registered: Jul 2001
Location: London
Distribution: RH 9
Posts: 151

Rep: Reputation: 30
Why can't you just embed a bit of java in the php? You could still use the php variables when you print the java out.

glj
 
Old 08-02-2001, 11:47 AM   #11
DJFauß
Member
 
Registered: May 2001
Location: Germany
Distribution: SuSE 8.1
Posts: 48

Original Poster
Rep: Reputation: 15
*gg* cause some of the people that are supposed to read the page are viewing from corporate computers that have Java turned off due to security restrictions ( ... sad, but true)
 
Old 08-03-2001, 04:53 AM   #12
glj
Member
 
Registered: Jul 2001
Location: London
Distribution: RH 9
Posts: 151

Rep: Reputation: 30
oh, sorry, don't know then. Had a quick search, but everyone seems to say use java!
 
Old 08-03-2001, 10:48 AM   #13
DJFauß
Member
 
Registered: May 2001
Location: Germany
Distribution: SuSE 8.1
Posts: 48

Original Poster
Rep: Reputation: 15
k thx anyway =)
 
Old 08-07-2001, 09:44 AM   #14
Grim
LQ Newbie
 
Registered: Aug 2001
Location: Finland
Distribution: Debian
Posts: 1

Rep: Reputation: 0
It's impossible to use PHP to open pop-up windows. PHP is a server-side programming language which means that it is executed on the server and it produces HTML-code which is sent to the client.

So you are going to have to use Javascript if there is no HTML-command to open pop-up boxes.
 
Old 08-07-2001, 01:33 PM   #15
DJFauß
Member
 
Registered: May 2001
Location: Germany
Distribution: SuSE 8.1
Posts: 48

Original Poster
Rep: Reputation: 15
k thx
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Parsing URL in PHP benrose111488 Programming 6 10-12-2005 12:12 PM
PHP not parsing code... libertyboy Linux - Software 3 08-24-2004 11:09 AM
php not taking arguments when passed through URLs BrianK Linux - Software 2 03-29-2004 11:38 AM
php parsing some includes. others are not. toadeny Linux - Newbie 4 09-18-2003 09:50 AM
php not parsing chens_83 Linux - General 9 02-19-2003 04:53 AM


All times are GMT -5. The time now is 03:37 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration