473,389 Members | 1,067 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,389 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 5321
* 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: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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...

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.