Sangha-08 Posted July 6, 2008 Share Posted July 6, 2008 The header says it all, could someone please tell me how to do this include(' Get this part from the url after file=') Thanks Quote Link to comment Share on other sites More sharing options...
DeanWhitehouse Posted July 6, 2008 Share Posted July 6, 2008 you would do include ($_GET['file']); Quote Link to comment Share on other sites More sharing options...
kenrbnsn Posted July 6, 2008 Share Posted July 6, 2008 Doing that way without some checking can be very insecure. To be more secure, put the files you know to be safe into an array and check the value being sent against those values. Ken Quote Link to comment Share on other sites More sharing options...
Sangha-08 Posted July 6, 2008 Author Share Posted July 6, 2008 well .. i need more help now, i thought i could do what i want to do this way but it wont work i want to do something like this - <?php include(http://someotherwebsite.com/video.php?id=$_GET['file']); ?> Could you help me on that ??? thanks for the quick reply, i appreciate it mate =) Quote Link to comment Share on other sites More sharing options...
wildteen88 Posted July 6, 2008 Share Posted July 6, 2008 From that url your provided seems you want to place a movie in your webpage. You should use file_get_contents instead. include/require should be use for including PHP source code. You should make sure allow_url_fopen is enabled. Quote Link to comment Share on other sites More sharing options...
Sangha-08 Posted July 6, 2008 Author Share Posted July 6, 2008 i see.. but i want to copy the whole web page and make it look like its mine for instance I want to turn http://www.somerandomwebsite.com/video.php?id=110019 to http://www.mywebsite.com/video.php?id=110019 Quote Link to comment Share on other sites More sharing options...
DeanWhitehouse Posted July 6, 2008 Share Posted July 6, 2008 I dunno if people are going to help you do that. Quote Link to comment Share on other sites More sharing options...
wildteen88 Posted July 6, 2008 Share Posted July 6, 2008 i see.. but i want to copy the whole web page and make it look like its mine for instance I want to turn http://www.somerandomwebsite.com/video.php?id=110019 to http://www.mywebsite.com/video.php?id=110019 As long as your are not ripping the other site then file_get_contents will do what you want. There is no point in using a http url within include/require as only the output (text/html) of the requested script (video.php) will be returned, not the PHP source code. This is why I told you to use file_get_contents. Quote Link to comment Share on other sites More sharing options...
Sangha-08 Posted July 6, 2008 Author Share Posted July 6, 2008 OH NO NO I HAVE permission, my bro owns the other website Quote Link to comment Share on other sites More sharing options...
DeanWhitehouse Posted July 6, 2008 Share Posted July 6, 2008 then why not get the code from the pages from him and just make them on your website? Quote Link to comment Share on other sites More sharing options...
Sangha-08 Posted July 6, 2008 Author Share Posted July 6, 2008 because my server is not powerful enough to do that Quote Link to comment Share on other sites More sharing options...
DeanWhitehouse Posted July 6, 2008 Share Posted July 6, 2008 then include won't work, as it will basically put the code into the page and load it. Quote Link to comment Share on other sites More sharing options...
wildteen88 Posted July 6, 2008 Share Posted July 6, 2008 Whats the server got to do with it? Whats wrong with my suggestion earlier? Quote Link to comment Share on other sites More sharing options...
Sangha-08 Posted July 6, 2008 Author Share Posted July 6, 2008 well , i cant get it to work .. i need to make it look like http://www.mydomain.com/vid.php?id=1199191818 from http://www.mybroswebsite.com/vid.php?id=1199191818 Quote Link to comment Share on other sites More sharing options...
Sangha-08 Posted July 6, 2008 Author Share Posted July 6, 2008 OMG IS Any1 gonna help me ? ??? ??? ??? ??? Quote Link to comment Share on other sites More sharing options...
DarkWater Posted July 6, 2008 Share Posted July 6, 2008 We're all trying to help you. If your brother has such an amazing website that your server can't handle, he should know how to do this, right? Why don't you show us what you have right now and tell us which errors (if any) it displays. How about that? Quote Link to comment Share on other sites More sharing options...
wildteen88 Posted July 6, 2008 Share Posted July 6, 2008 You're not explaining yourself properly, What do want it to look like? How are we supposed to know whats supposed to look like if you give us fake urls. If you did: echo file_get_contents('http://www.google.com'); The google homepage will be displayed on your site. The same applies to the urls you're providing. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.