Jump to content

Different behavior in localhost and webhosting account - fopen()


zerandib

Recommended Posts

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!  :?:

Link to comment
Share on other sites

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!

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.