• Post Reply Bookmark Topic Watch Topic
  • New Topic

how to use curl command tool for login the website and search the result from the website  RSS feed

 
sumit anand
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

Can anyone please send the live curl command with batch file to login the website and search the result from the website.

Thanks
Sumit
 
Henry Wong
author
Sheriff
Posts: 23295
125
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Let's move this topic to a more appropriate forum -- as this doesn't really have to do with BEA/Weblogic.

Henry
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 37462
537
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is the command to pass credentials via curl:
curl -u username:password http://website.com

Then you can grep to search the resulting text if you want to search for something on the webpage. For searching the full website, you'd use a search feature of that website, no?
 
sumit anand
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
can you send more specific curl command to search on the website.
e.g.- suppose to login in the forum website and search some keyword(e.g. - linux is entered as search text and submit the page for search)
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 37462
537
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
curl isn't the right tool for that. You'd be better off with a testing tool like Selenium.

Also, be careful what you do with the result. Some sites don't like you scraping content.
 
sumit anand
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for quick response. I understand the Selenium can be used for building test script. Can you tell how can we record the transaction of website.
e.g. login to the website and perform the search operation and keep the transaction record of all the activity performed on the website.
 
Paul Clapham
Sheriff
Posts: 22819
43
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How to record the transactions? If it were me doing the design, I'd write the record to a file, most likely. You might use a logging package if the data you wanted to record was compatible with logging, that would save you replicating the logic required for logging.
 
sumit anand
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank for reply. My query is not to perform transaction record using the logging. I am more focused about how can we do track the transaction record as I said in example which should be catered using curl command is it possible to use curl command tool? or any tool that can cater to perform the transaction recording?
 
christian Daniel
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can use curl --user user:pass https://www.website.com/ it will work

Regards
Christian

 
Campbell Ritchie
Marshal
Posts: 56525
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch Christian Daniel.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!