Results 1 to 25 of 39
Thread: wget google
-
09-30-2006, 04:25 PM #1Web Hosting Master
- Join Date
- Apr 2005
- Posts
- 697
wget google
Anybody here know how to use wget within linux to get this link from google?
PHP Code:http://vp.video.google.com/videodownload?version=0&secureurl=tAAAAMM7Pe6fxq34m-dckO2jE0ctIb3TsxAaQpTAQwfLQ-7B3oZS4CxvKAEtGG_17cKnSyqYfNqD8Ui6r-zB6-70dJInlUEHH-tFd299eiDCC70xBionQvW9m-eILudzhw6bL1y7zpr-fHKL2UoeamkrW7kSG622hBYjUP9pZJEiSyxok237-ffF2uvgR_HSKFf79rCdrhPzqgx8x6iW-rsiire_OwQR14BMLpDK6IpsRJ7Tf3vg_uSh2OpG3jS5AY-rVQ&sigh=Id4VMzKKDSqHvTJ0X7Zjoi5UHNU&begin=0&len=388160&docid=5147852388396123647
PHP Code:wget http://vp.video.google.com/videodownload?version=0&secureurl=tAAAAMM7Pe6fxq34m-dckO2jE0ctIb3TsxAaQpTAQwfLQ-7B3oZS4CxvKAEtGG_17cKnSyqYfNqD8Ui6r-zB6-70dJInlUEHH-tFd299eiDCC70xBionQvW9m-eILudzhw6bL1y7zpr-fHKL2UoeamkrW7kSG622hBYjUP9pZJEiSyxok237-ffF2uvgR_HSKFf79rCdrhPzqgx8x6iW-rsiire_OwQR14BMLpDK6IpsRJ7Tf3vg_uSh2OpG3jS5AY-rVQ&sigh=Id4VMzKKDSqHvTJ0X7Zjoi5UHNU&begin=0&len=388160&docid=5147852388396123647
Please help if you can...
-
09-30-2006, 04:49 PM #2Web Hosting Guru
- Join Date
- Apr 2006
- Location
- NJ, USA
- Posts
- 258
What distro are you running?
-
09-30-2006, 04:51 PM #3Web Hosting Master
- Join Date
- Apr 2005
- Posts
- 697
just Centos 4.3...
-
09-30-2006, 05:01 PM #4Retired Moderator
- Join Date
- Oct 2004
- Location
- San Francisco, CA
- Posts
- 2,455
Probably better here, since you're using wget and not a programming language persay.
Tyler Cole
Eeek, a Blog
-
09-30-2006, 05:04 PM #5Problem Solver
- Join Date
- Mar 2003
- Location
- California USA
- Posts
- 13,681
try this instead
wget "http://vp.video.google.com/videodownload?version=0&secureurl=tAAAAMM7Pe6fxq34m-dckO2jE0ctIb3TsxAaQpTAQwfLQ-7B3oZS4CxvKAEtGG_17cKnSyqYfNqD8Ui6r-zB6-70dJInlUEHH-tFd299eiDCC70xBionQvW9m-eILudzhw6bL1y7zpr-fHKL2UoeamkrW7kSG622hBYjUP9pZJEiSyxok237-ffF2uvgR_HSKFf79rCdrhPzqgx8x6iW-rsiire_OwQR14BMLpDK6IpsRJ7Tf3vg_uSh2OpG3jS5AY-rVQ&sigh=Id4VMzKKDSqHvTJ0X7Zjoi5UHNU&begin=0&len=388160&docid=5147852388396123647" -O fileSteven Ciaburri | Industry's Best Server Management - Rack911.com
Software Auditing - 400+ Vulnerabilities Found - Quote @ https://www.RACK911Labs.com
Fully Managed Dedicated Servers (Las Vegas, New York City, & Amsterdam) (AS62710)
FreeBSD & Linux Server Management, Security Auditing, Server Optimization, PCI Compliance
-
09-30-2006, 06:49 PM #6Web Hosting Master
- Join Date
- Apr 2005
- Posts
- 697
Thanks! that works perfect!
-
09-30-2006, 07:38 PM #7Web Hosting Master
- Join Date
- Apr 2005
- Posts
- 697
how would we put that into a php code:
wget "\"http......\"";
is that so?
-
10-01-2006, 12:23 AM #8Web Hosting Master
- Join Date
- Nov 2004
- Location
- Australia
- Posts
- 1,737
Originally Posted by ti_nhatrang
Something like:
PHP Code:system('wget -O file "http://blahblah.com/url?dsds=3434&hop=7" ');
-
10-01-2006, 03:48 AM #9Web Hosting Master
- Join Date
- Apr 2005
- Posts
- 697
I've tried
PHP Code:<?
exec('wget -P/home/domix/public_html/video http://vp.video.google.com/videodownload?version=0&secureurl=swAAAFxHENxoED_R-3UsXxv5YNc7RQhgjXIn5-LgTF2bOgd2_QIq86fGuHTqXkiw-f2vNa0P0cK_YCRW5sHHgq23NT5Bi2QKjIHzvD5u88RhJu0PEdSdXJhf1p-gWh_qjd1Rb4G02dFuXayqx5J848Vwol70EkxNNdM6hxMnhOd6fTJnoQO0xiBkLok-kFlwWZP2hDddsGr9m8F8rS-nDLz2zmu5xgNNO62_ua9fWH2xI-lEPU2AFp8vtGHruhctqJEf6g&sigh=Z1MX2wPv7qA8Vs07wAZ311L4Xgg&begin=0&len=69866&docid=4526819805867391097 -O $filename.mp4');
?>
-
10-01-2006, 04:11 AM #10Web Hosting Master
- Join Date
- Nov 2004
- Location
- Australia
- Posts
- 1,737
No problems, I'll put on my tinfoil telepathy hat and work out what the error message was so I can solve it for you ...
-
10-01-2006, 04:12 AM #11Web Hosting Master
- Join Date
- Apr 2005
- Posts
- 697
Thanks! I appreciate it! I eve try putting the -O infront of the link itself and still doesn't work... Thanks for trying, I will wait for your reply.
-
10-01-2006, 04:32 AM #12Junior Guru Wannabe
- Join Date
- Jul 2006
- Location
- Switzerland
- Posts
- 97
I think you will have to wait for a while then, biranoz is trying to tell you that you need to explain what kind of error messages you are receiving, instead of just stating that i does not work.
Have you tried putting your URL in quotes? like
Code:exec('wget -P "/home/domix/public_html/video http://vp.video.google.com/videodownload?version=0&secureurl=swAAAFxHENxoED_R-3UsXxv5YNc7RQhgjXIn5-LgTF2bOgd2_QIq86fGuHTqXkiw-f2vNa0P0cK_YCRW5sHHgq23NT5Bi2QKjIHzvD5u88RhJu0PEdSdXJhf1p-gWh_qjd1Rb4G02dFuXayqx5J848Vwol70EkxNNdM6hxMnhOd6fTJnoQO0xiBkLok-kFlwWZP2hDddsGr9m8F8rS-nDLz2zmu5xgNNO62_ua9fWH2xI-lEPU2AFp8vtGHruhctqJEf6g&sigh=Z1MX2wPv7qA8Vs07wAZ311L4Xgg&begin=0&len=69866&docid=4526819805867391097" -O $filename.mp4');
-
10-01-2006, 05:00 AM #13Web Hosting Master
- Join Date
- Nov 2004
- Location
- Australia
- Posts
- 1,737
Yes, I hadn't noticed the lack of quotes in the example - that would probably
destroy any chance of it working in one hit! (but I'll leave you wondering whether
I actually own a tinfoil telepathy hat... )
-
10-01-2006, 05:55 AM #14Web Hosting Master
- Join Date
- Apr 2005
- Posts
- 697
Wolle, I've tried yours and still didn't download via php, however, if I do any of these via SSH, then it works...
I do not get any errors, it just simply does not download.
-
10-01-2006, 05:57 AM #15Aspiring Evangelist
- Join Date
- May 2004
- Location
- Singapore
- Posts
- 374
You should escape the URL using PHP's escapeshellarg() function.
Code:exec('wget -P /home/domix/public_html/video '.escapeshellarg('http://vp.video.google.com/videodownload?version=0&secureurl=swAAAFxHENxoED_R-3UsXxv5YNc7RQhgjXIn5-LgTF2bOgd2_QIq86fGuHTqXkiw-f2vNa0P0cK_YCRW5sHHgq23NT5Bi2QKjIHzvD5u88RhJu0PEdSdXJhf1p-gWh_qjd1Rb4G02dFuXayqx5J848Vwol70EkxNNdM6hxMnhOd6fTJnoQO0xiBkLok-kFlwWZP2hDddsGr9m8F8rS-nDLz2zmu5xgNNO62_ua9fWH2xI-lEPU2AFp8vtGHruhctqJEf6g&sigh=Z1MX2wPv7qA8Vs07wAZ311L4Xgg&begin=0&len=69866&docid=4526819805867391097').' -O $filename.mp4');
-
10-01-2006, 06:03 AM #16Web Hosting Master
- Join Date
- Apr 2005
- Posts
- 697
that's right, I even remove the $filename and just try it movie.mp4 and it still doesn't download... Have you tried it on your own server? Does it work? If it does, then I guess it's me internally then rather than the script itself...
-
10-01-2006, 06:06 AM #17Aspiring Evangelist
- Join Date
- May 2004
- Location
- Singapore
- Posts
- 374
If the same command works in shell but not in PHP, then you may want to check that the apache's user has permission to run wget, and apache can find wget (use full path instead).
-
10-01-2006, 06:07 AM #18Web Hosting Master
- Join Date
- Apr 2005
- Posts
- 697
I can download say from url: wget http://www.yahoo.com/file.zip fine... just that the long crazy url doesn't work... also, if I use tinyurl.com to shorten the url, then it works fine as well with any the quotations marks etc... I'm just hoping there's another solution rathern than going through tinyurl.com....
-
10-01-2006, 06:32 AM #19Aspiring Evangelist
- Join Date
- May 2004
- Location
- Singapore
- Posts
- 374
There is no reason wget will fail with long URLs.
Have you tried the code I suggested? I tried it on my own server and it works.
-
10-01-2006, 06:35 AM #20Web Hosting Master
- Join Date
- Apr 2005
- Posts
- 697
I certainly have, infact this is my exact php code:
PHP Code:<?
exec('wget -P /home/domix/public_html '.escapeshellarg('http://vp.video.google.com/videodownload?version=0&secureurl=swAAAFxHENxoED_R-3UsXxv5YNc7RQhgjXIn5-LgTF2bOgd2_QIq86fGuHTqXkiw-f2vNa0P0cK_YCRW5sHHgq23NT5Bi2QKjIHzvD5u88RhJu0PEdSdXJhf1p-gWh_qjd1Rb4G02dFuXayqx5J848Vwol70EkxNNdM6hxMnhOd6fTJnoQO0xiBkLok-kFlwWZP2hDddsGr9m8F8rS-nDLz2zmu5xgNNO62_ua9fWH2xI-lEPU2AFp8vtGHruhctqJEf6g&sigh=Z1MX2wPv7qA8Vs07wAZ311L4Xgg&begin=0&len=69866&docid=4526819805867391097').' -O filename.mp4');
?>
-
10-02-2006, 04:57 AM #21Web Hosting Master
- Join Date
- Apr 2005
- Posts
- 697
can anybody else help me with this? Thanks in advance!
-
10-02-2006, 05:40 AM #22Web Hosting Master
- Join Date
- Nov 2004
- Location
- Australia
- Posts
- 1,737
Try my version, with the double quotes inside the single quotes, does that work?
It's almost certainly a quoting problem biting you here.
-
10-02-2006, 05:44 AM #23Web Hosting Master
- Join Date
- Apr 2005
- Posts
- 697
I definately have for the past 2 days, and it still does not download... Have you tried it yourself? Are you getting any errors or what kind of success are you getting from that particular link?
-
10-02-2006, 05:47 AM #24Web Hosting Master
- Join Date
- Apr 2005
- Posts
- 697
I mean, I obviously do not need to use wget if you have another solution, anything to download the file is fine...
-
10-02-2006, 10:12 AM #25Web Hosting Master
- Join Date
- Nov 2004
- Location
- Australia
- Posts
- 1,737
I think the problem is the ridiculous URL. Maybe you could use tinyurl.com to solve that problem.
... ah ... tested and works beautifully.
PHP Code:system("wget -O file.mp4 http://tinyurl.com/z66ls");