using curl with shell script.


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting using curl with shell script.
# 1  
Old 10-27-2009
using curl with shell script.

hi

please help me out here,

i want to use curl command in shell script to test web pages,

what i have is an opening page, when i click on a button on opening page, the next page comes up and then i have to upload a file n then click another button to submit and then comes the output page, where i have to click that button to download the output.

Please let me know how i can do it in shell when nesting of curl is not allowed.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Check status of long running multiple curl commands in shell script

I am working on script. it reads a file which contains multiple lines Ex; curl --write-out %{http_code} --silent --output /dev/null http://hostname:port/input=1 curl --write-out %{http_code} --silent --output /dev/null http://hostname:port/input=2 curl --write-out %{http_code} --silent ... (2 Replies)
Discussion started by: oraclermanpt
2 Replies

2. Shell Programming and Scripting

Shell Script run curl command calling cyber-Ark RESTAPI

Hi All, We have a requirement to Integrate Cyber-Ark with Informatica . Basically cyberark will contain the username and password for Database. First step will be 1)In shell Script run curl command calling cyber-Ark RESTAPI requesting the credentials and store the secret in a variable. ... (0 Replies)
Discussion started by: Praveena9102
0 Replies

3. Shell Programming and Scripting

Rest APIs without curl in shell script

We are not allowed to install curl on our linux box. Is there any other way to talk to Rest API's in shell script rather than using curl ? - Please advise - thank you (3 Replies)
Discussion started by: rv_champ
3 Replies

4. Shell Programming and Scripting

Curl/wget shell script to follow redirect.

Hello eveyone. I would like to create a simple batch with curl (or wget) to download a URL but the URL I can only download from the browser and not from shell because curl and wget won't follow the 301 redirect which I get :confused: I tried with curl -L but no luck. I want to hear your opinion.... (5 Replies)
Discussion started by: accolito
5 Replies

5. UNIX for Dummies Questions & Answers

Shell Imgur upload with curl

Hi imgur(){ $*|convert label:@- png:-|curl -F "image=@-" -F "key=1913b4ac473c692372d108209958fd15" http://api.imgur.com/2/upload.xml|grep -Eo "<original>(.)*</original>" | grep -Eo "http://i.imgur.com/*";}Execute a command, convert output to .png file, upload file to imgur.com, then returning... (10 Replies)
Discussion started by: slashdotweenie
10 Replies

6. Shell Programming and Scripting

Shell Script for Upload/download files using cURL

hi please help me out here, i want to use curl command in shell script to test web pages, what i have is an opening page, when i click on a button on opening page, the next page comes up and then i have to upload a file n then click another button to submit and then comes the output page,... (2 Replies)
Discussion started by: Olivia
2 Replies

7. Shell Programming and Scripting

curl into a shell script (variable transmission): need help

Hey I'm writting a little shell script, and I started using curl with it today. I would like to login into a website using curl (--data argument). This part is working, curl sent me the webpage that we see when we log in this website. Problem: This is a temporary page. When I log in this... (0 Replies)
Discussion started by: Link_
0 Replies

8. Shell Programming and Scripting

CGI shell script curl reponse problem

Hi, I am running a bash shell script for some simple web server CGI, the script runs as expected from the browser except the following: curl --silent --max-time 10 --output /dev/null --write-out %{http_code} http://server:port/filename This line outputs 404 when i execute the script... (0 Replies)
Discussion started by: Moxy
0 Replies

9. Shell Programming and Scripting

shell script vorher batch mit curl

salve! this in windows command script (batch). i need it for mac....unix or linux @echo off Echo Router reconnect: AVM FRITZ!BOX FON WLAN 7170 curl "http://192.168.10.10:49000/upnp/control/WANIPConn1" -H "Content-Type: text/xml; charset="utf-8"" -H... (1 Reply)
Discussion started by: onkeldave
1 Replies

10. Shell Programming and Scripting

Use cURL in shell script and get most recent file from remote server using SFTP

I have been trying to implement the following shell script -- sftp to remote server get list of files in the directory sftp get the most recent listed file exit This script will be scheduled to be executed everyday using CRON or CONTROL-M and the need is to have absolutely no human... (7 Replies)
Discussion started by: toobrown1
7 Replies
Login or Register to Ask a Question
CURLINFO_LOCAL_PORT(3)					     curl_easy_getinfo options					    CURLINFO_LOCAL_PORT(3)

NAME
CURLINFO_LOCAL_PORT - get the latest local port number SYNOPSIS
#include <curl/curl.h> CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_LOCAL_PORT, long *portp); DESCRIPTION
Pass a pointer to a long to receive the local port number of the most recent connection done with this curl handle. PROTOCOLS
All EXAMPLE
{ CURL *curl; CURLcode res; curl = curl_easy_init(); if(curl) { curl_easy_setopt(curl, CURLOPT_URL, "http://example.com/"); res = curl_easy_perform(curl); if(CURLE_OK == res) { long port; res = curl_easy_getinfo(curl, CURLINFO_LOCAL_PORT, &port); if(CURLE_OK == res) { printf("We used local port: %ld ", port); } } curl_easy_cleanup(curl); } return 0; } AVAILABILITY
Added in 7.21.0 RETURN VALUE
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not. SEE ALSO
curl_easy_getinfo(3), curl_easy_setopt(3), CURLINFO_PRIMARY_PORT(3), CURLINFO_LOCAL_IP(3), libcurl 7.54.0 March 16, 2017 CURLINFO_LOCAL_PORT(3)