TalkPHP
 
 
Account Login
Latest Articles
» The basic usage of PHPTAL, a XML/XHTML template library for PHP
» Vulnerable methods and the areas they are commonly trusted in.
» Simple way to protect a form from bot
» The Basics On: How Session Stealing Works
» How to keep your forms from double posting data
IRC Channel
IRC Speech Bubble Join the friendly bunch on IRC...
(#TalkPHP on Freenode)

...Also available via a web interface.

See this thread for information on the TalkPHP Free Hugs Initiative™. Subject to availability.
Associates
Associates
CSS Tutorials
Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old 01-28-2008, 05:02 AM   #1 (permalink)
Orc
The Prestige
 
Orc's Avatar
 
Join Date: Dec 2007
Posts: 1,044
Thanks: 193
Orc is on a distinguished road
Default Question with URL Vars

How would I associate URL Vars of one php to another? Like including a php inside a php file then grabbing those URL Vars from the included php file and putting them in the current?

URL Vars I mean by:
PHP Code:
// sid would be the URL Var
http://www.example.com/?sid=id 

// Example of what I have:
include 'http://www.example.com/index.php?foo=bar';
// I want to grab the url vars from that
// So I could put them in my index.php
// And yes that included file is on my server 
I understand that it's an array, so would I have to take all the vars out of the $_GET/$_POST arrays, and place them into the current php files url var arrays? :/

Maybe using Extract?
__________________
VillageIdiot can have my babbies ;d

Last edited by Orc : 01-28-2008 at 05:53 AM.
Orc is offline  
Reply With Quote
Old 01-28-2008, 09:03 AM   #2 (permalink)
Orc
The Prestige
 
Orc's Avatar
 
Join Date: Dec 2007
Posts: 1,044
Thanks: 193
Orc is on a distinguished road
Default

bump (chars)
__________________
VillageIdiot can have my babbies ;d
Orc is offline  
Reply With Quote
Old 01-28-2008, 09:48 AM   #3 (permalink)
The Acquainted
 
EyeDentify's Avatar
 
Join Date: Nov 2007
Location: Sweden
Posts: 106
Thanks: 13
EyeDentify is on a distinguished road
Default

why not just access it by:

$_GET['foo']
__________________
Of course the whole point of a doomsday machine, would have been lost if you keep it a secret.
EyeDentify is offline  
Reply With Quote
The Following User Says Thank You to EyeDentify For This Useful Post:
Orc (01-28-2008)
Old 01-28-2008, 09:52 AM   #4 (permalink)
Orc
The Prestige
 
Orc's Avatar
 
Join Date: Dec 2007
Posts: 1,044
Thanks: 193
Orc is on a distinguished road
Default

Quote:
Originally Posted by EyeDentify View Post
why not just access it by:

$_GET['foo']
How does that work.. Oh wait, today my brain isn't working so well. -_-
__________________
VillageIdiot can have my babbies ;d
Orc is offline  
Reply With Quote
Old 01-28-2008, 11:07 AM   #5 (permalink)
The Addict
 
Join Date: Nov 2007
Posts: 264
Thanks: 2
TlcAndres is on a distinguished road
Default

As long a the variables exists on the url bar, the included file should have access to the super globals too.
TlcAndres is offline  
Reply With Quote
The Following User Says Thank You to TlcAndres For This Useful Post:
Orc (01-28-2008)
Old 01-28-2008, 11:08 AM   #6 (permalink)
Orc
The Prestige
 
Orc's Avatar
 
Join Date: Dec 2007
Posts: 1,044
Thanks: 193
Orc is on a distinguished road
Default

Quote:
Originally Posted by TlcAndres View Post
As long a the variables exists on the url bar, the included file should have access to the super globals too.
Yeah, just my head is all over the place today. I need some vitamins.
__________________
VillageIdiot can have my babbies ;d
Orc is offline  
Reply With Quote
Old 01-28-2008, 11:15 AM   #7 (permalink)
Moderateur
RegEx Guru PHP Guru Top Contributor Advanced Programmer 
 
Salathe's Avatar
 
Join Date: Apr 2007
Posts: 1,393
Thanks: 5
Salathe is on a distinguished road
Default

If the included file is on your server, why would you want to introduce the overhead of loading it over the network (which if you're wanting the source code is a huge security flaw) rather than using a path on the file system?
Salathe is offline  
Reply With Quote
Old 01-28-2008, 09:30 PM   #8 (permalink)
Orc
The Prestige
 
Orc's Avatar
 
Join Date: Dec 2007
Posts: 1,044
Thanks: 193
Orc is on a distinguished road
Default

Quote:
Originally Posted by Salathe View Post
If the included file is on your server, why would you want to introduce the overhead of loading it over the network (which if you're wanting the source code is a huge security flaw) rather than using a path on the file system?
This is for my Template and Modules system, it passes everything through the index.php of the main page, so any url variables will be pointing to the modules, and templates..
__________________
VillageIdiot can have my babbies ;d
Orc is offline  
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT. The time now is 03:07 AM.

 
     

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Inactive Reminders By Icora Web Design