473,698 Members | 2,522 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to execute linux command (wget) from within javascript code

7 New Member
Hi,
i am new to javascript. actually i need to execute the wget command from within a javascript code, but i don't know the syntax for executing the linux-ccommands from within javascript code.
Can anyone guide please?
Oct 3 '06 #1
3 12862
dtra
2 New Member
i'm almost certain that that's not possible
major security risk

this tutorial might be of some assistance though
http://www.sitepoint.c om/article/take-command-ajax

you pretty much need to have an interface to the command line
either through php, or another scripting language (obviously whatever can be run on your server)

but if you're going to use wget, you might as well use file_get_conten ts (if that's available and you're using php)

hth
dave
Oct 3 '06 #2
analwarsi
7 New Member
can anyone suggest a method in javascript which is equivalent to the wget command in linux.actually i need a method in javascript which will help to download webcontents upto a certain depth without the user interaction.
please guide.
Oct 3 '06 #3
analwarsi
7 New Member
i'm almost certain that that's not possible
major security risk

this tutorial might be of some assistance though
http://www.sitepoint.c om/article/take-command-ajax

you pretty much need to have an interface to the command line
either through php, or another scripting language (obviously whatever can be run on your server)

but if you're going to use wget, you might as well use file_get_conten ts (if that's available and you're using php)

hth
dave
can You suugest any method in javascript that has the capability of downloading the contents of a website upto a certain depth without user interaction
Oct 5 '06 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

8
3109
by: wj | last post by:
Hi all, I wonder if it is possible to execute PHP-code automatically. Is it for example possible to sent an e-mail every day at lets say 9.00 pm automatically to adresses from a database? Thanx, WJ
7
7719
by: Ken | last post by:
How do I call c:\wget\wget.exe from a php or html file? so I can use php variables to define the file names to download. I want to set up wget to download several files from a server to my hard drive so they can be used internally. Ken
3
7855
by: Bob Garbados | last post by:
I'm pretty new to php\linux and I'm trying to encrypt a file using gpg from a php page on a linux box and it's not working. The following code works for executing 'ls', but not gpg... $descriptorspec = array( 0 => array("pipe", "r"), // stdin is a pipe that the child will read from 1 => array("pipe", "w"), // stdout is a pipe that the child will write to 2 => array("file", "/tmp/error-output.txt", "a") // stderr is a file to
4
2814
by: Jhuola Hoptire | last post by:
Just installed J2RE 1.4.2 on a Linux server. I am very knew to the POSIX world. I couldn't dig-up much in the docs or via google about the following: 1 - Is there a standard way to make sure users (all, or some) can "reach" java? eg one could presumably create a java.sh or aliases ... Where is the standard Linux directory to put such a script (and why)?
2
5045
by: Tim Williams | last post by:
I'm trying to write a simple python program to access a MySQL database. I'm having a problem with using MySQLdb to get the results of a SQL command in a cursor. Sometimes the cursor.execute works, sometimes not. From mysql: mysql> show databases; +-----------+ | Database |
6
14725
by: Marco | last post by:
I'm looking for a free class to download web pages from Linux. Do you know something like that? Thanks, Marco
14
11144
by: technocrat | last post by:
db2 -t -v -f/home.../filename >output_file-name I have a java stored procedure..which has to run the above command...not sure how i can run this command through java.. any suggestions are appreciated..
1
3552
by: raocheng | last post by:
Please see the following code. Suppose I have many shell commands to be executed. And I don't want to fork a sub shell for each command(eg: status,output = commands.getstatusoutput(cmd)) because it is too expensive. I want to use only one sub shell to execute all these commands and want to get each command's output. How can I accomplish this task ? Thanks in advance. =========================================== #!/usr/bin/env python
1
7197
by: mikegolden | last post by:
An application I'm working on makes extensive use of output parameters and return values, thus forcing me to use the ADODB Command object to execute the stored procs. For recordset returning stored procs, calling Execute() is no problem using JavaScript: var rs = cmd.Execute(); However, for non-recordset returning stored procs -- and this app has many -- I need to call Execute() passing adExecuteNoRecords for the Options parameter,...
0
8676
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9164
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9029
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8898
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8870
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7734
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5860
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4370
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3051
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.