zerandib Posted January 26, 2009 Share Posted January 26, 2009 Hello I have read a webpage content using PHP fopen() it works fine But it gives different results when im executing that code in localhost and in my web-hosting provider in localhost: (Executing in the localhost) After reading the webpage content i have locate the place where .flv file resides. and got that URL Ex: http://www.myweb.com/variable1/fixedpart/myvideo.flv and im able to download this video. but in the web host when i run this, (Executing in the web-hosting account) After reading the webpage content i have locate the place where .flv file resides. and got that URL Ex: http://www.myweb.com/variable2/fixedpart/myvideo.flv and here im unable to download the video Note that i have execute the same PHP file in my localhost and web hosting area. I have tested this on 2 hosting accounts. the result is the same. that is even im getting the .flv URL im unable to download that video. Says, im not authorized to download the video. But in localhost, no issues. im able to download the videos from the generated flv link Whats the issue behind this? how to reslove this! :?: Quote Link to comment Share on other sites More sharing options...
Mchl Posted January 26, 2009 Share Posted January 26, 2009 allow_url_fopen Quote Link to comment Share on other sites More sharing options...
zerandib Posted January 26, 2009 Author Share Posted January 26, 2009 I have checked the php infomation on the server allow_url_fopen = on but problem still exisits... any idea! ??? Quote Link to comment Share on other sites More sharing options...
Mchl Posted January 26, 2009 Share Posted January 26, 2009 It might be that myweb.com server is blocking access from certain domains... Not sure really. Quote Link to comment Share on other sites More sharing options...
kmaid Posted January 26, 2009 Share Posted January 26, 2009 I had this issue with my old webhost and getting the stats of a counter strike server. It turned out that they had a firewall on and even though allow_url_fopen was enabled the firewall was blocking the requests. I am afraid this is defiantly a question for your host. Hopefully your host will be like mine and just add a rule in for you! Quote Link to comment Share on other sites More sharing options...
PFMaBiSmAd Posted January 26, 2009 Share Posted January 26, 2009 If the site where the video resides is using some authentication and that authentication is working on one server but not another, then the code is probably doing something that is server configuration specific and you would need to post your code in order for anyone to be able to help. Quote Link to comment Share on other sites More sharing options...
phparray Posted January 26, 2009 Share Posted January 26, 2009 Try using curl. As long as curl is enabled it will work more reliably then fopen. 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.