php header

Discussion in 'PHP' started by Silver89, Jul 22, 2008.

  1. #1
    Hi,

    I'm trying to open a .torrent file with a header redirect as such:

    header('Location:'.$torrentRow[3].'.torrent');
    PHP:
    However sometimes this is unsucessfull and isntead of opening the .torrent file as a downloaded file it will open the source view of the file in the browser.

    How can I stop this?

    Thanks
     
    Silver89, Jul 22, 2008 IP
  2. live-cms_com

    live-cms_com Notable Member

    Messages:
    3,128
    Likes Received:
    112
    Best Answers:
    0
    Trophy Points:
    205
    Digital Goods:
    1
    #2
    I don't think it's a PHP problem, maybe it's your database row or something else.
     
    live-cms_com, Jul 22, 2008 IP
  3. Silver89

    Silver89 Notable Member

    Messages:
    2,243
    Likes Received:
    72
    Best Answers:
    0
    Trophy Points:
    205
    #3
    Silver89, Jul 22, 2008 IP
  4. live-cms_com

    live-cms_com Notable Member

    Messages:
    3,128
    Likes Received:
    112
    Best Answers:
    0
    Trophy Points:
    205
    Digital Goods:
    1
    #4
    live-cms_com, Jul 22, 2008 IP
  5. Silver89

    Silver89 Notable Member

    Messages:
    2,243
    Likes Received:
    72
    Best Answers:
    0
    Trophy Points:
    205
    #5
    If I click that .torrent url above it opens it as text in my browser, does it do that for you?
     
    Silver89, Jul 22, 2008 IP
  6. live-cms_com

    live-cms_com Notable Member

    Messages:
    3,128
    Likes Received:
    112
    Best Answers:
    0
    Trophy Points:
    205
    Digital Goods:
    1
    #6
    Yes, the source. Maybe your file only partially uploaded, or your are hotlinking incorrectly, but it's not the redirect.
     
    live-cms_com, Jul 22, 2008 IP
  7. Silver89

    Silver89 Notable Member

    Messages:
    2,243
    Likes Received:
    72
    Best Answers:
    0
    Trophy Points:
    205
    #7
    It's weird though because the torrent files work. I'm not too sure what's causing this problem.
     
    Silver89, Jul 22, 2008 IP
  8. CristianR

    CristianR Peon

    Messages:
    704
    Likes Received:
    26
    Best Answers:
    0
    Trophy Points:
    0
    #8
    CristianR, Jul 23, 2008 IP
    Silver89 likes this.
  9. Jeremy Yak

    Jeremy Yak Peon

    Messages:
    31
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #9
    I'm not a torrenting person, but don't they have a different sort of protocol? Some browsers may not know how to handles them, and instead just offer it up to be downloaded. If not that, the post above me looks promising :)
    ~Jeremy~
     
    Jeremy Yak, Jul 23, 2008 IP
  10. Silver89

    Silver89 Notable Member

    Messages:
    2,243
    Likes Received:
    72
    Best Answers:
    0
    Trophy Points:
    205
    #10
    Silver89, Jul 23, 2008 IP
  11. CristianR

    CristianR Peon

    Messages:
    704
    Likes Received:
    26
    Best Answers:
    0
    Trophy Points:
    0
    #11
    No problem.
     
    CristianR, Jul 24, 2008 IP