Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Nov 9th, 2004, 12:28 PM   #1
fishtwel
Newbie
 
Join Date: Nov 2004
Posts: 2
Rep Power: 0 fishtwel is on a distinguished road
I wonder if someone can help me with this. I would like to know, if is possible, how to go about taking values from a file and plug them into a form on a website and then submit the form. My problem is figuring out how to get these values into the form and then submitting it. If anyone can lead me in the right direction with possibly a snipet of code, or even just what language would be best for doing this, I would be most grateful. THANKS!!
fishtwel is offline   Reply With Quote
Old Nov 9th, 2004, 2:41 PM   #2
Pizentios
Programming Guru
 
Pizentios's Avatar
 
Join Date: May 2004
Location: Brandon, Manitoba, Canada
Posts: 2,023
Rep Power: 7 Pizentios is on a distinguished road
Send a message via ICQ to Pizentios Send a message via MSN to Pizentios
It'll be easyer if you grab values from a text file with php and then submit them to what ever page that the form that you imataiting submits to. Does that make sense?
__________________
Profanity is the one language that all programmers understand.

Check out my Blog <---updated Nov 30 2007!
Pizentios is offline   Reply With Quote
Old Nov 10th, 2004, 7:34 AM   #3
fishtwel
Newbie
 
Join Date: Nov 2004
Posts: 2
Rep Power: 0 fishtwel is on a distinguished road
Yea, I think I got it. I will have to go do some brushing up on my PHP in order to do so. Its been a year or so since I last touched that language. Is there any topics that you could give me to focus on in order to accomplish this problem. It would be much appreciated. I dont want someone to do it for me, I just could use alittle direction, which is what these forums should be for. THANKS!!
fishtwel is offline   Reply With Quote
Old Nov 10th, 2004, 8:44 AM   #4
Pizentios
Programming Guru
 
Pizentios's Avatar
 
Join Date: May 2004
Location: Brandon, Manitoba, Canada
Posts: 2,023
Rep Power: 7 Pizentios is on a distinguished road
Send a message via ICQ to Pizentios Send a message via MSN to Pizentios
I don't think that your going to find many topics on this forum about what you need. However, you might want to read up on grabing text from a file, also study the webpage that your trying to imatait and find out what gets passed to the next page.
__________________
Profanity is the one language that all programmers understand.

Check out my Blog <---updated Nov 30 2007!
Pizentios is offline   Reply With Quote
Old Nov 10th, 2004, 3:05 PM   #5
tempest
Programming Guru
 
tempest's Avatar
 
Join Date: Oct 2004
Posts: 1,041
Rep Power: 5 tempest is on a distinguished road
Send a message via ICQ to tempest Send a message via AIM to tempest Send a message via Yahoo to tempest
you would have to write a local js file with ActiveX file handlers and a filler for the form and then write someone on the address bar of IE like..

// Assuming that you create a "remeber values" thing yourself for a certain site...
javascript:void(var blah = document.createElement("script");blah.src="c:\\yourscript.js";

// Or if you're the webmaster put that code in your <head> section...

Or if you wanted to get all complex with it and like, you could use a set of foreach loops and such and get all the forms and form elements into a file with the site that they are from. And have it bring that information back next time it comes... you can do alot of things... Sorry, i dont remember the ActiveX file handlers in JS (this will be IE only, i think) but you can check www.webxpertz.net . They will probably have it.

-- Hope you understood that as i have a tendancy to ramble
__________________

tempest is offline   Reply With Quote
Old Nov 10th, 2004, 6:51 PM   #6
kurifu
Expert Programmer
 
kurifu's Avatar
 
Join Date: Jul 2004
Location: Halifax, Nova Scotia (Canada)
Posts: 784
Rep Power: 5 kurifu is on a distinguished road
Send a message via ICQ to kurifu Send a message via MSN to kurifu
When you fill out data in a form and submit the data to the website, it posts the data through either the GET post method in which case the data is passed through the address string, or it uses the POST method which formats and passes the data through HTTP headers.

Look at the page source for something like this:

<FORM NAME="blah" METHOD="GET" ACTION="page">

METHOD is the method the form is using and action is the page that it is posting the data to.

All you have to do is use cURL to simulate that posting to the "page" value with the proper form item names and values, and voila.... it is almost the same as posting the form youself.

cURL can be downloaded as a PEAR module for PHP, simply typing

pear install curl

on your command line will likely do the trick, it may already even be installed. Similarly the HTTP_Request module (which is easier to use than curl) is available through PEAR for PHP as well.

Good luck.
__________________
Clifford Matthew Roche &lt;geek@cliffordroche.com&gt;
Web Hosting: http://www.crd-hosting.com
Consulting: http://www.crdev-consulting.com
kurifu is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 4:08 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC