blazing Posted March 5, 2007 Share Posted March 5, 2007 Hi, im looking to include a page in my php file, for example http://othersite.com/foward/15052 (I think its with Header("")), forwards the page to othersite.com?viewmovie=15052&tempid=10101505050550505&autostart=0 I need to get the address into my php page, but I dont know where to start with this. I need to then break up the variables, I could probably do that with explode, but everytime I go to the forward page it will change the viewmovie variables, so I gotta make it dynamicly break up the variables on the spot. If you can point me towards any commands or tutorials that would be great, thanks. Link to comment https://forums.phpfreaks.com/topic/41330-getting-variables-from-a-forwarded-page/ Share on other sites More sharing options...
willpower Posted March 5, 2007 Share Posted March 5, 2007 You wont include a file with the header comand. The header command will reedirect rather than include if you are looking to redirect then the command is correct. the main ideas here would be o capture the url (if i understand your question) and for this id use $url =$_SERVER['REQUEST_URI']; the use the $url var in the redirect where appropriate. The explode can be used...perhaps by exploding at each "/". But from yor post I'd struggle to offer more info. Will Link to comment https://forums.phpfreaks.com/topic/41330-getting-variables-from-a-forwarded-page/#findComment-200247 Share on other sites More sharing options...
blazing Posted March 5, 2007 Author Share Posted March 5, 2007 I dont want to so much include the file, but I want the variables that are in the forwarded page only, so I can use them. Link to comment https://forums.phpfreaks.com/topic/41330-getting-variables-from-a-forwarded-page/#findComment-200253 Share on other sites More sharing options...
Lumio Posted March 5, 2007 Share Posted March 5, 2007 what you mean is mod_rewrite... thats not php. Link to comment https://forums.phpfreaks.com/topic/41330-getting-variables-from-a-forwarded-page/#findComment-200256 Share on other sites More sharing options...
blazing Posted March 5, 2007 Author Share Posted March 5, 2007 no... I dont want that I want to have my page viewmovie.php on my server it loads http://othersite.com/foward/15052 and I get my script to figure out what page it forwards to, because its differant everytime I then want to get the page name it went to, in this example othersite.com?viewmovie=15052&tempid=10101505050550505&autostart=0 I then want to close that, split up the variables and on my page echo tempid=whatever Link to comment https://forums.phpfreaks.com/topic/41330-getting-variables-from-a-forwarded-page/#findComment-200259 Share on other sites More sharing options...
blazing Posted March 5, 2007 Author Share Posted March 5, 2007 I tried fsockopen() but it will only check if the site is up or not, still searching for something to read the page name that gets forwarded. Link to comment https://forums.phpfreaks.com/topic/41330-getting-variables-from-a-forwarded-page/#findComment-200266 Share on other sites More sharing options...
blazing Posted March 5, 2007 Author Share Posted March 5, 2007 you can close this, I found curl Link to comment https://forums.phpfreaks.com/topic/41330-getting-variables-from-a-forwarded-page/#findComment-200276 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.