SitePoint Sponsor

User Tag List

Results 1 to 7 of 7
  1. #1
    Life is strife TriGeminal's Avatar
    Join Date
    Apr 2005
    Location
    Trigeminal Ganglion
    Posts
    633
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Any function to post a url containing zip or rar files?

    I was using Curl to post a link outside my server, it's working well..

    but if I need to post a url of a zip or rar file, then Curl doesn't do the job!

    What should I do?
    "The only thing necessary for the triumph of evil ..
    .. is for good men to do nothing"
    Edmund Burke.

  2. #2
    Life is strife TriGeminal's Avatar
    Join Date
    Apr 2005
    Location
    Trigeminal Ganglion
    Posts
    633
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    None?
    "The only thing necessary for the triumph of evil ..
    .. is for good men to do nothing"
    Edmund Burke.

  3. #3
    SitePoint Wizard silver trophy
    Join Date
    Mar 2006
    Posts
    6,132
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    are you trying to actually send the contents of the file in the post data, or are you just trying to send a url and let the receiving server grab the file via http/ftp?

  4. #4
    Life is strife TriGeminal's Avatar
    Join Date
    Apr 2005
    Location
    Trigeminal Ganglion
    Posts
    633
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by clamcrusher
    are you trying to actually send the contents of the file in the post data, or are you just trying to send a url and let the receiving server grab the file via http/ftp?
    No, I try to recieve a zip file in my server via post data
    Via http

    Example:

    - External server had somefile.zip

    - My server should copy that file to a personal computer.

    It's something like redirection, but for a .zip || .rar file!
    (I know header("location:.....") and those stuff, but they are "Getting" URL not posting, thus that make my ISP scan my URLs)

    Thanks
    "The only thing necessary for the triumph of evil ..
    .. is for good men to do nothing"
    Edmund Burke.

  5. #5
    SitePoint Evangelist dmsuperman's Avatar
    Join Date
    Feb 2005
    Location
    A box
    Posts
    516
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    are you looking for:
    PHP Code:
    header("Content-Type: application/octet-stream");
    header("Content-Disposition: attachment; filename=somefile.rar");
    echo(
    file_get_contents("/home/user/downloads/secretfile.rar")); 
    That'll get /home/user/downloads/secretfile.rar and send it as somefile.rar to the user, so you could make it send it as "educational_image.jpg" then just rename it on your computer, or "educational_data.rar".
    <(^.^<) \(^.^\) (^.^) (/^.^)/ (>^.^)>
    Core 2 Duo E8400 clocked @ 3.375GHz, 2x2GB 800MHz DDR2 RAM
    5x SATA drives totalling 2.5TB, 7900GS KO, 6600GT

  6. #6
    Life is strife TriGeminal's Avatar
    Join Date
    Apr 2005
    Location
    Trigeminal Ganglion
    Posts
    633
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thank you dmsuperman
    That's exactly what I've been searching for
    "The only thing necessary for the triumph of evil ..
    .. is for good men to do nothing"
    Edmund Burke.

  7. #7
    SitePoint Evangelist dmsuperman's Avatar
    Join Date
    Feb 2005
    Location
    A box
    Posts
    516
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    No problem
    <(^.^<) \(^.^\) (^.^) (/^.^)/ (>^.^)>
    Core 2 Duo E8400 clocked @ 3.375GHz, 2x2GB 800MHz DDR2 RAM
    5x SATA drives totalling 2.5TB, 7900GS KO, 6600GT


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •