Jump to content

hno

Members
  • Posts

    255
  • Joined

  • Last visited

Profile Information

  • Gender
    Not Telling

hno's Achievements

Advanced Member

Advanced Member (4/5)

0

Reputation

  1. I have two servers one one them is for storing my files and the other one is for allowing users to download from that link.The thing is I don't want download link to be revealed for the users and for that reason I tried to use curl to send files to user's browser. This is the code that I have used set_time_limit(0); $ch = curl_init(); curl_setopt($ch,CURLOPT_URL,$url); curl_setopt($ch,CURLOPT_RETURNTRANSFER,true); curl_setopt($ch,CURLOPT_HEADER,1); curl_setopt($ch,CURLOPT_NOBODY,1); curl_setopt($ch,CURLOPT_POST,1); curl_setopt($ch,CURLOPT_POSTFIELDS,$post); curl_setopt($ch,CURLOPT_TIMEOUT,1000); curl_exec($ch); $bytes = curl_getinfo($ch,CURLINFO_CONTENT_LENGTH_DOWNLOAD); $r = curl_exec($ch); header('Expires: 0'); // no cache header('Cache-Control: must-revalidate, post-check=0, pre-check=0'); header('Last-Modified: '.gmdate('D, d M Y H:i:s',time()).' GMT'); header('Cache-Control: private',false); header('Content-Type: application/x-rar-compressed'); header('Content-Disposition: attachment; filename="'.basename($url).'"'); header('Content-Transfer-Encoding: binary'); header('Content-Length: '.strlen($r)); // provide file size header('Connection: close'); ob_clean(); echo $r; But there are two major problems with this.First,Download speed is very low . Second , The user doesn't have the ability to resume downloads . What's wrong with this? Thanks
  2. Thansk for reply I checked the website . every part that I click is an area , this is the code : <area shape="poly" coords="149,143,184,148,202,153,271,164,272,166,257,197,252,204,247,212,249,219,261,226,271,228,278,227,279,235,299,247,297,284,275,294,259,290,147,250,145,240,145,220,147,217,163,210,195,201,193,198,156,188,149,186,90,171,88,160,89,151,93,149,116,145" href="#" onclick="Patro(2);return false;"> these coords , define a shape of the sofa , so when I click on it , it calls a function . The thing is ,I don't think so it has all different colors and fabrics pictures for each sofa .I mean there is no way to do that !! , just think about a sofa with 30 different fabrics and 10 different colors , is it possible to have all these images that I can replace them ?!! I think , somehow like photoshop ,it changes the style online . I really appreciate your help Thanks
  3. thansk for reply I misunderstand it ,the way you said , is it changing the whole image and put another image instead ?I don't thing it does that ,because there is no way they can have 30 different colors and 30 different fabrics for each sofa !! I think it somehow convert the default part to a custom style . is there anyway to do that ? Thanks
  4. HI I'm thinking to do something like this , I've seen this in a website ,I'm a php designer but i don't know who something like this can be done . it's a website that sells sofas . we've the ability to change the color and fabric and see the result right away . for example ,this is the default sofa : then I can select a part of it and I can choose the fabric and color , then it make the result : thats it , How can I do that ? What should I do ? I'm really looking to hear from you King Regards
  5. Thanks for the reply Could someone please give me a code for converting videos to x264 ? I've tested several codes but non of the worked . Thanks
  6. HI every one . This is how I convert videoes to flv but the quality is decreasing very much . passthru("$ffmpegpath -i uploads/$video_name -ar 22050 -ab 32k -f flv -s 480x800 uploads/vid.flv"); How can I convert videos without any decrease of quality ? Thanks
  7. HI I've this simple code for downloading files from a direct link and move it to my webhost . <?php ini_set('display_errors', '1'); error_reporting(E_ALL); $v = "http://highestvideo.com/up_image/01-24-58-09!1!.jpeg"; $ch = curl_init($v); $fp = fopen('aaa/flower.jpg', 'w'); curl_setopt($ch, CURLOPT_FILE, $fp); curl_setopt($ch, CURLOPT_HEADER, 0); curl_exec($ch); curl_close($ch); fclose($fp); ?> I've set the permissions to 777 , It does create a file but it's 0 byte and empty . my webhost is not cpanel , it's kloxo server 6.1.2 stable . What is the problem ? How can I fix it ? thanks
  8. I'm using ffmpeg to converting videos on my site. I'm converting all the videos to flv . if I upload flv , it has not problem but if I upload any other file type except flv , it shows me this error : ffmpeg version 0.7.11, Copyright (c) 2000-2011 the FFmpeg developers built on Jul 26 2013 01:58:02 with gcc 4.4.7 20120313 (Red Hat 4.4.7-3) configuration: --enable-gpl --enable-version3 --enable-nonfree --enable-shared --enable-libmp3lame --enable-libx264 --enable-libfaac --enable-libvorbis --enable-libopencore-amrnb --enable-libopencore-amrwb libavutil 50. 43. 0 / 50. 43. 0 libavcodec 52.123. 0 / 52.123. 0 libavformat 52.111. 0 / 52.111. 0 libavdevice 52. 5. 0 / 52. 5. 0 libavfilter 1. 80. 0 / 1. 80. 0 libswscale 0. 14. 1 / 0. 14. 1 libpostproc 51. 2. 0 / 51. 2. 0 Seems stream 0 codec frame rate differs from container frame rate: 2997.00 (2997/1) -> 14.99 (15000/1001) Input #0, avi, from 'uploads/v_37.avi': Metadata: title : AJ McLean - Teenage Wildlife encoder : Lavf52.16.0Duration: 00:04:17.19, start: 0.000000, bitrate: 470 kb/s Stream #0.0: Video: mpeg4, yuv420p, 640x480 [PAR 1:1 DAR 4:3], 14.98 fps, 14.99 tbr, 14.99 tbn, 2997 tbc Stream #0.1: Audio: mp3, 22050 Hz, stereo, s16, 128 kb/s WARNING: The bitrate parameter is set too low. It takes bits/s as argument, not kbits/s [buffer @ 0x2137ae0] w:640 h:480 pixfmt:yuv420p tb:1/1000000 sar:1/1 sws_param: [scale @ 0x2139da0] w:640 h:480 fmt:yuv420p -> w:320 h:240 fmt:yuv420p flags:0x4 Output #0, flv, to 'uploads/aaa.flv': Metadata: title : AJ McLean - Teenage Wildlife encoder : Lavf52.111.0 Stream #0.0: Video: flv, yuv420p, 320x240 [PAR 1:1 DAR 4:3], q=2-31, 200 kb/s, 1k tbn, 14.99 tbc Stream #0.1: Audio: libmp3lame, 22050 Hz, stereo, s16, 0 kb/s Stream mapping: Stream #0.0 -> #0.0 Stream #0.1 -> #0.1 Press [q] to stop, [?] for help frame= 26 fps= 0 q=2.0 Lsize= 80kB time=00:00:01.73 bitrate= 375.7kbits/s video:64kB audio:14kB global headers:0kB muxing overhead 2.339835%last line is : muxing overhead 2.339835% the final file is a 1 second video ( it doesn't make any different how long is the video , all of them become a 1 second video ) What is the problem ? this is the ffmpeg code that convert the video : echo passthru("$ffmpegpath -i uploads/$file -ar 22050 -ab 32 -f flv -s 320×240 uploads/aaa.flv 2>&1");Thanks
  9. the problem is this , where I can find the error code ? It just says Io error , just it . is there a specific place that I can find the error code ? Thanks
  10. I looked for the error but I couldn't find anything , Where I should find the error code ?
  11. hi eveyone I've used uploadify on my script ,it work fine on my localhost but when I upload it on my linux webhost ,when I want to upload a video it shows me io error I've searched and tried lot of codes and solutions but they didn't work . The file size is 500kb , I'm using it for a video website . How can I get the exact IO error ? anyidea what can be the problem and how to solve it ? I really need your help Thanks
  12. HI, I'm making a upload from url site and i'm using curl to upload files.I want to header user to another page after completion of upload so first I need to make sure that the upload is complete and then move user to another page. The problem is that if I place header code after curl even when the upload is not complete the user is headed to another page.How can I do that ? Thanks
×
×
  • 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.