Getting Data from a Form
Posted: Sat Sep 23, 2006 3:32 pm
feyd | Please use
Basically, I want to have PHP send a request to http://noosphere.princeton.edu/cgi-bin/eggdatareq.pl with "year" set to the current year, "date" sent to the current date, etc, just as if a user submitted the form. Doing so should return a CSV file, which I can then process with getcsv().
How can I use PHP to submit a request with the necessary variables to get a .csv file back?
Thanks
Tom[/syntax]
feyd | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
Hello. I am trying to get data in a PHP readable format from http://noosphere.princeton.edu/data/basket_csv.html
Here is a snippet of the source code for that form:
[syntax="html"]<form method=get name="request" action="/cgi-bin/eggdatareq.pl">
<input type=hidden name=z value="1">
<center>
<table border cellpadding=5>
<tr>
<th>
Date:
<td>
<input type="text" name="year" value="1998" size="5">
<select name=month size=1>
<option value=1> January
<option value=2>February
<option value=3>March
<option value=4>April
<option value=5>May
<option value=6>June
<option value=7>July
<option value=8>August
<option value=9>September
<option value=10>October
<option value=11>November
<option value=12>December
</select>
<input type="text" name="day" value="1" size="3">How can I use PHP to submit a request with the necessary variables to get a .csv file back?
Thanks
Tom[/syntax]
feyd | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]