473,320 Members | 2,158 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Script to pass info to GET string

I need to create a perl script that basically loads a web page, asks for a
Username and stores it as "Username". Also, it takes the domain name of the
site (that runs the script) and stores that in "Domain".

Next it does a substition:

http://www.anothersite.com/whatever....me&var2=Domain

And forwards the user to that url.

I'm a total newbie here. Can someone hack up a quick script based on this
requirement? I'm going to do some string limits later, but I need some
template to start with as I'm completely stuck. Thanks!
Jul 19 '05 #1
5 5318
* Shabam:
I need to create a perl script that basically loads a web page, asks for a
Username and stores it as "Username". Also, it takes the domain name of the
site (that runs the script) and stores that in "Domain".

Next it does a substition:

http://www.anothersite.com/whatever....me&var2=Domain

And forwards the user to that url.


see perldoc CGI

Doing low-level things manually is a bad idea and error-prone, too...

bye
//Dave

--
Ja, der typische "Ich tippe alles ein was mir ein paar Trottel aus dem
IRC sagen"-Newbie wird aber kein Solaris nutzen... ;)
-- Christoph Gebhardt in bjt
Jul 19 '05 #2
Shabam wrote:
I need to create a perl script that basically loads a web page,
perldoc LWP
asks
for a Username
perldoc -f print
perldoc perlop (pretty far down in the section about "I/O Operators")
and stores it as "Username". Also, it takes the
Now, where and how do you want to store that? In a file? In a database? What
kind of database? Just not enough information...
domain name of the site (that runs the script) and stores that in
"Domain".

Next it does a substition:
http://www.anothersite.com/whatever....me&var2=Domain
I suppose this is meant to be result of the substitution? What is the
original string? Not enough information...
And forwards the user to that url.
???
Do you mean you want to open a browser program and load that page?
perldoc -f system
perldoc -f exec
I'm a total newbie here. Can someone hack up a quick script based on
this requirement?


Can probably yes, want to unlikely.
If you are looking for ready-made scripts you came to the wrong place.
Show us what you have and many people here will be happy to help you with
the next step.

jue
Jul 19 '05 #3
> Now, where and how do you want to store that? In a file? In a database?
What
kind of database? Just not enough information...
Very basic. Just in memory is fine.
domain name of the site (that runs the script) and stores that in
"Domain".

Next it does a substition:
http://www.anothersite.com/whatever....me&var2=Domain


I suppose this is meant to be result of the substitution? What is the
original string? Not enough information...


I just need it to substitute the "Username" and "Domain" into the string,
and redirect the user to that url. The
"http://www.anothersite.com/whatever.cgi" part of it is hardcoded.
Do you mean you want to open a browser program and load that page?
perldoc -f system
perldoc -f exec


No. I mean this whole script is running as a cgi on a web page. It takes
the username that the user enters, and based on the domain name that the cgi
script is running from, gets the other variable (Domain). Then, it
redirects the user to the url
http://www.anothersite.com/whatever....me&var2=Domain.

Jul 19 '05 #4
Shabam wrote:
[...]
No. I mean this whole script is running as a cgi on a web page.


Oh, a stealth CGI question.
Good by then.
jue
Jul 19 '05 #5
> Oh, a stealth CGI question.
Good by then.


What are you talking about? It's a simple web page cgi. User enters
"Username", and the page takes that, along with the domain name from the
server, and redirects the user to another script. This is being used for an
order system for hosting, so that the user gets http://username.domain.com
as their address. The billing system I'm using now doesn't support such a
mechanism natively, as it accepts full domain names only. Thus I need to do
it this way.

I'm guessing you think I'm trying to do something bad. Don't assume,
without any basis.
Jul 19 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Robert Cohen | last post by:
Hi All, I have what is an easy question for you all, but I have not idea (this is in vbscript). I have this script below that works great. It figures out the user logged in and gives the AD...
6
by: Oli | last post by:
Alright people, I'll get straight to the point.... Bascially a company I do some work for has just gone bankrupt and is in liquidation and I want to get hold of one of the ASP scripts off their...
2
by: Luis | last post by:
I have a function sililar to the one below on one of my pages. It puts the value of a field on a form into a variable called FieldName: function checkSomething() { var FieldName =...
18
by: Ed Jay | last post by:
<disclaimer>js newbie</disclaimer> My page has a form comprised of several radio buttons. I want to poll the buttons to determine which button was selected and convert its value to a string. I...
1
by: CR1 | last post by:
I found a great cookie script below, but don't know how to make it also pass the values sent to the cookie, to a querystring as well for tracking purposes. Can anyone help? If there was a way to...
3
by: uremog | last post by:
I have a set of of check boxes. onClick, the checkboxes call check_radio and recup_checkbox. the referenced radios function as group selectors. check_radio just unchecks the radios if someone...
1
by: satish2112 | last post by:
Hi, I have a text-area which contains values from mysql database and 2 buttons, Edit and Update. When I click on the Edit button, I can edit the text-area (initially non-editable). After this,...
3
by: David | last post by:
On Sun, May 4, 2008 at 4:43 AM, lev <levlozhkin@gmail.comwrote: Hi, I started tidying up the script a bit, but there are some parts I don't understand or look buggy. So I'm forwarding you the...
7
by: jeddiki | last post by:
Hi, As I am in Turkey at present, I can not see vidoes on youtube. So I have tried a few proxies but keep finding them slow or not working. So I have installed myphpProxy on my server under...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

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.