I have to write a script that logs into a web site that is on port 443 (https), uses .htaccess and is on a remote server from a script that is on port 80 on a local server.

Would it be easier and is there a way to run the script on port 443?

Once the script logs into the web site using .htaccess I need to pass a string to the remote site through a browser which will then query the remote sites database and display everything that is held in that database on a page on the remote site. I need to be able to GET the results from that query and insert it into a database on the local system.

I have some questions:

1) I need to log into .htaccess on a remote secure server using a php script on the local server, how do I do that?

2) When I pass the string to the remote secure server how do I get all the results from that string?

3) I have to get distinct information from off of a page using either CURL or fread, etc.

On the html page there are labels like,

NAME: (persons name)
PHONE: (persons phone) , etc.

I want to the the information such as the (persons name) or (phone) and then put it in my database. I might have to spider the site for multiple scripts, unless I can find one script and figure out how to get all the info by only calling one of the scripts, which look like they are written in ASP.NET.

What would be the best php function or set of functions to use? Keep in mind I am having to log into a site using php to get the information on a daily basis.

I have to get very large amounts of information and insert it into my clients database.

    If anyone has dealt with CURL let me know. Keep in mind that I am not writing a spider I am only trying to get the results of the query that is generated when a string is passed to their program.

      You can do all of this without using CURL. Look at the documentation for the http and ssl fopen wrappers. Look at the context options you can put in the context from stream_context_create

      Mark

        5 months later

        once I pass a string to the script on the the remote web site how do I retrieve the results?

        When I actually go to the site and fill out the form it goes to a page that has all the results listed. Then I click on a view link for each listing to view the listing.

        I need to make sure that I get all of the information for each listing. I also noticed that the page that shows all the listings may be a different script than the one that shows each individual listing.

        Here is the url for the script that shows all the listings.

        www.example.com/directory/powersearchList?origsalechannel=2&origsalechannel=1&origsalechannel=3&origsalechannel=4&origsalechannel=5&toyear=2008&fromyear=2007&year=2007-2008&numresultsperpage=2147483647&notAvailableCount=0&app_id=1&orderby=&showoptions=&showopts=&totalNumResults=1&pageNumber=1&rowIndex=&cyberlot=&saleID=17&saleNumber=17&saleDate=04%2F24%2F2007&auctionID=AZAA&salechannel=1&irname=04%2F24%2F2007%2BArizona%2BA.A.%2B-%2BTUESDAY%7CS%2BSALE&group=&region=&locationState=&notebook_item_id=&notebook_sale_id=&notebook_sale_channel=&notebookaction=&PS=&cid=&navigation=&appUrlId=1007

        Here is the url for the script that show one listing at a time.

        www.example.com/directory/powersearchDetail?PS=&orderby=&region=&saleDate=04%2F24%2F2007&cid=&locationState=&notebookaction=&showopts=&notebook_sale_channel=&origsalechannel=2&origsalechannel=1&origsalechannel=3&origsalechannel=4&origsalechannel=5&auctionID=AZAA&totalNumResults=1&notebook_item_id=&cyberlot=&rowIndex=&showoptions=&saleNumber=17&group=&salechannel=1&appUrlId=1007&fromyear=2007&numresultsperpage=1&app_id=1&pageNumber=1&resultsPerPage=1&navigation=&irname=04%2F24%2F2007%2BArizona%2BA.A.%2B-%2BTUESDAY%7CS%2BSALE&saleID=17&notebook_sale_id=&year=2007-2008&toyear=2008&notAvailableCount=0

          Write a Reply...