Forum Moderators: coopster

Message Too Old, No Replies

Posting data through PHP

Logging into a form

         

synotic

10:37 pm on Nov 17, 2004 (gmt 0)

10+ Year Member



I've done some Google searching and mucking around with some test code I've found but I just can't seem to figure this out. Specifically, I am trying to access my library record which is available online, so that I can see what books I have checked out, their individual due dates and any overdue books. If I could just access the page via PHP, I would be able to parse it appropriately and make it more accessible for myself. However, I've never tried to login to a page using PHP.

The page doesn't use SSL and only asks for one's name and his or her barcode number. The fields' names are "name" and "code" respectively. Also, just typing [example.com...] doesn't work— it just loads the same login page.

Is there anything I should read/look into to achieve what I'm trying to do? Is more information needed? I appreciate any help regarding my problem :)

[edited by: coopster at 12:18 am (utc) on Nov. 18, 2004]
[edit reason] generalized url [/edit]

volatilegx

12:01 am on Nov 18, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



What you want to do is use Curl to create an HTTP GET request to the library's website. Try a search for PHP Curl or go to [us2.php.net...]

May end up having to spoof the HTTP_REFERER header in order to get their script to spit out the data.

coopster

12:20 am on Nov 18, 2004 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



If it's a form page I would figure out where the "action" attribute is headed. You also need to know whether it's a POST or GET request.