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 Link to comment https://forums.phpfreaks.com/topic/113436-help-include-_getfile/ Share on other sites More sharing options...
DeanWhitehouse Posted July 6, 2008 Share Posted July 6, 2008 you would do include ($_GET['file']); Link to comment https://forums.phpfreaks.com/topic/113436-help-include-_getfile/#findComment-582855 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 Link to comment https://forums.phpfreaks.com/topic/113436-help-include-_getfile/#findComment-582858 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 =) Link to comment https://forums.phpfreaks.com/topic/113436-help-include-_getfile/#findComment-582861 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. Link to comment https://forums.phpfreaks.com/topic/113436-help-include-_getfile/#findComment-582865 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 Link to comment https://forums.phpfreaks.com/topic/113436-help-include-_getfile/#findComment-582881 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. Link to comment https://forums.phpfreaks.com/topic/113436-help-include-_getfile/#findComment-582885 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. Link to comment https://forums.phpfreaks.com/topic/113436-help-include-_getfile/#findComment-582888 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 Link to comment https://forums.phpfreaks.com/topic/113436-help-include-_getfile/#findComment-582895 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? Link to comment https://forums.phpfreaks.com/topic/113436-help-include-_getfile/#findComment-582901 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 Link to comment https://forums.phpfreaks.com/topic/113436-help-include-_getfile/#findComment-582903 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. Link to comment https://forums.phpfreaks.com/topic/113436-help-include-_getfile/#findComment-582906 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? Link to comment https://forums.phpfreaks.com/topic/113436-help-include-_getfile/#findComment-582908 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 Link to comment https://forums.phpfreaks.com/topic/113436-help-include-_getfile/#findComment-582917 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 ? ??? ??? ??? ??? Link to comment https://forums.phpfreaks.com/topic/113436-help-include-_getfile/#findComment-582972 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? Link to comment https://forums.phpfreaks.com/topic/113436-help-include-_getfile/#findComment-583003 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. Link to comment https://forums.phpfreaks.com/topic/113436-help-include-_getfile/#findComment-583041 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.