| Who | When |
Messages | |
|
|
|
| Minh
|
1
|
 |
|
04-05-2001 01:30 AM ET (US)
|
|
Edited by author 04-05-2001 04:05 AM
Friday, I ll come with example on how to use PHP. I ll provide url to see the example, and the code associated. I ll also show some design methodology (mine) to create applications. Put on the message board any suggestion you have for friday.
|
| Minh
|
2
|
 |
|
04-05-2001 04:08 AM ET (US)
|
|
I have done a basic example with post method. You can see it working at :
ieng9.ucsd.edu/~cs134s/example/information/phone/phone.php
You should download the source and print it to have it on friday.
ieng9.ucsd.edu/~cs134s/example/information/phone.zip
there are no comments on the code, we ll do that on friday.
|
| cs134sck
|
3
|
 |
|
04-05-2001 08:01 PM ET (US)
|
|
Deleted by author 04-05-2001 08:02 PM
|
| fdsa
|
4
|
 |
|
04-05-2001 08:04 PM ET (US)
|
|
how can I test php scripts in ieng9?
|
| anonymous
|
5
|
 |
|
04-05-2001 08:07 PM ET (US)
|
|
Few questions about the assignment: 1. The specified web page to receive information on a home is a secure web site. To "speak" to the web server we must encrypt the data being send and de-encrypt data coming back. Do we need to use *this* site? Can we use any site we want?
2. Do we have to use ieng9 & ucsd specified resources? Can we have our scripts graded our own server that accessable on the web?
Thanks
|
| devin
|
6
|
 |
|
04-05-2001 08:30 PM ET (US)
|
|
My guess is that php4 speaks ssl so it'll be straight forward. Can anyone confirm this?
|
| fdsa
|
7
|
 |
|
04-06-2001 12:52 AM ET (US)
|
|
I have a suggestion to the professor & TAs: I don't think this discussion board will work very well for this class. Why don't you try something like Ultimate Bulletin Board ( http://www.infopop.com/).
|
| Minh
|
8
|
 |
|
04-06-2001 01:02 AM ET (US)
|
|
How to : test your scripts on ieng9.
you have to create a "public_html" directory in your home directory. Then you have to set the rights on that directory to be executable. Set also the right of your account directory to executable.
Basically : your account is cs134szz When you log in you are in the directory cs134szz. do : cd .. set the rights to executable : chmod 711 cs134szz go to your directory : cd cs134szz create the directory : mkdir public_html set the rights : chmod 711 public_html
then put one of your basic code (test.php) in the public_html directory. You can test it using your browser: ieng9.ucsd.edu/~cs134szz/test.php
|
| Alan
|
9
|
 |
|
04-06-2001 02:15 AM ET (US)
|
|
https URL: we are aware that PHP does not support https urls via the fopen() function as it does vanilla http urls. we're looking into various possible solutions to this issue; watch the message board for updates.
message board: while we're on the topic, we also know that the current message board system is lacking in some ways, particularly the ability to create discussion threads. infopop.com's Ultimate Bulletin Board is unfortunately not an option, due to cost. until we identify an alternative solution, please continue using this forum.
|
| ggavinmoss
|
10
|
 |
|
04-06-2001 11:42 AM ET (US)
|
|
As far as the message board goes, why don't we just use Discus, like most other CSE classes? It's simple to use an I'm sure most people have had at least one class that's used it. http://discus.ucsd.edu
|
| Charles Elkan
|
11
|
 |
|
04-06-2001 12:08 PM ET (US)
|
|
ABOUT THE MESSAGE BOARD: We agree that threads would be useful, and Quicktopic does not have them directly. We will probably transition to Discus, but Discus has its own disadvantages.
ABOUT THE PROJECT: The HomeWorth site uses HTTP encryption, which is complicated to deal with using PHP. Until we fix this problem (soon!), you should work on the part of the project that uses Yahoo sites.
Charles Elkan
|
| asdf
|
12
|
 |
|
04-06-2001 12:30 PM ET (US)
|
|
Can we use other sites besides homeworth? I think this would alieviate the issue with HTTPS
|
| devin
|
13
|
 |
|
04-06-2001 03:00 PM ET (US)
|
|
Edited by author 04-06-2001 03:08 PM
PROJECT: I personally would like to learn how to use ssl with php.
MESSAGE BOARD: Threads would be nice.
|
| Peter
|
14
|
 |
|
04-06-2001 03:29 PM ET (US)
|
|
How do you login to insci14 to actually do project 1? I have tried multiple times, but it keeps saying that the mysql command is not found.
|
| Alan
|
15
|
 |
|
04-07-2001 12:38 PM ET (US)
|
|
the mysql binary on ieng9 is located at /software/nonrdist/mysql/bin/mysql.
|
| me
|
16
|
 |
|
04-10-2001 06:49 PM ET (US)
|
|
Question about the report for project 1.
Specifically, how detailed should the report be. Can you provide an outline? past reports? content? etc...
The vague guidelines don't do justice.
|
| you
|
17
|
 |
|
04-10-2001 06:53 PM ET (US)
|
|
Can you post the lecture notes prior to the class session? This will help us to know what you will cover in the specified class.
|
| Peter
|
18
|
 |
|
04-11-2001 02:26 AM ET (US)
|
|
Hi, For project 1, what does this mean specifically?
'Your web site should display all the same information above about the best recent comparable sale.'
How do we choose the best comparable sale? By distance, price or any other means? Also, does the above statement mean that we'll display two houses when we search one address? (One with the same address, and the best comparable one) Thank you.
|
| someone
|
19
|
 |
|
04-11-2001 05:05 PM ET (US)
|
|
What good is this board if no prof/ta's don't answer any questions. There is one post from 'asdf' on 4/6 that hasn't been answered yet. I'm waiting for that persons response.
|
| Alan
|
20
|
 |
|
04-11-2001 05:32 PM ET (US)
|
|
Edited by author 04-11-2001 05:33 PM
we're still in the process of deciding the specifics of how to handle this case. at this point, we have solutions for the https problem at various levels, but we're weighing the costs and benefits of having the project include certain details versus giving you the infrastructure to ignore those details.
the project is structured in parts which are largely independent. you should be completely done with the portion of the project which deals with the Yahoo! site. if you feel that you abolutely cannot make progress on the project without resolution on this issue, send me (alsu@cs.ucsd.edu) mail.
|
| Charles Elkan
|
21
|
 |
|
04-11-2001 06:27 PM ET (US)
|
|
ABOUT THE HTTPS PROBLEM: Please see Alan Su's response. If you have the Yahoo parts of the project completely done already, then congratulations, you are well ahead of schedule.
ABOUT asdf's QUESTION ON 4/6: If you can find the Homeworth information on another public web site, e.g. number of bedrooms and bathrooms, you may use it. In this case, please post the link. I am not aware of any other site with the same info, unfortunately.
"BEST COMPARABLE SALE" We mean the house identified by Homeworth as the best recent comparable sale. You should write your PHP code so that it takes an address as input, then finds the necessary information. This way you can use alternative definitions of closest comparable house. Yes, your web site should display info about two houses, like Homeworth does.
LECTURE NOTES These will be posted after each lecture. I edit them after the lecture, before posting, to include info that wasn't in them before. Reading the notes is not a substitute for coming to class.
ABOUT THE REPORT We can't provide a past report because this is a brand-new class. You are welcome to bring your outline or your draft to a TA office hour to discuss it and get ideas for improving it. The report should be detailed enough to be interesting, but it should also be five pages at most. You should use the report-writing skills that you learned in your general education and lab science classes. These skills are important for software jobs with top companies.
Charles Elkan
|
| Alan
|
22
|
 |
|
04-12-2001 10:22 AM ET (US)
|
|
in section tomorrow, i'll be going over some of the following topics. in particular, we'll be discussing the relevance of these topics to the part of the project dealing with the Bank of America site.
- SSL from PHP - HTTP headers - HTTP POST
|
| 134A Student
|
23
|
 |
|
04-12-2001 08:15 PM ET (US)
|
|
just wanted to mention that the alternative site mentioned in class http://homeadvisor.msn.com doesn't seem to work because the information is not actually displayed in html but is in javascript variables. is there a way to access these variables with php? i can do it if i stick the page in a frame with some javascript code looking into that page, but that wouldn't be using php.
|
| Minh
|
24
|
 |
|
04-13-2001 01:46 AM ET (US)
|
|
For the javascript. Javascript being client side, it should always be possible to find the value of a variable : var price = 100; but it is true that if they assign new values to that variable all the time (price=former_price*1.4;), it could be hard to find out what it is equal to. I had a look at the msn website but didn't find this case. Could you provide the url, or how you found the page where you couldn't access the information ?
|
| 134A Student
|
25
|
 |
|
04-13-2001 02:11 PM ET (US)
|
|
Minh, Go to the home advisor website: http://homeadvisor.msn.com and scroll down near the middle of the page where it asks for a street address and zip code. enter an address and zip code( for example: 10646 KEMERTON RD 92126 ) and view the source on the resulting page. instead of using html to say something like: price of home = 200,000 it uses javascript and has: var string = "price of home = " + priceVariable; document.write(string);
|
| Alan
|
26
|
 |
|
04-13-2001 06:36 PM ET (US)
|
|
Edited by author 04-13-2001 06:49 PM
"134A Student" is correct in that the information might not be readily available at the same location in the output where one would expect to find it. however, if the information is able to be displayed in a javascript window, there must be a way to extract it from the page source. in the best case, there is some javascript array which stores all the data, which is arguably easier to parse than some HTML with the information embedded within it. in the worst case, you'd essentially need to write a javascript interpreter. i haven't looked at the referenced site, so i don't know which case is more applicable. however, if it is the latter, i humbly suggest that this is going to complicate the project more than it's worth.
|
| Its Easy!
|
27
|
 |
|
04-14-2001 01:00 AM ET (US)
|
|
Edited by author 04-14-2001 01:00 AM
Take a look closely at homeadvisor's source. The simply "yank" alll the data from an HTTP GET into java script variables. Take a look at http:// 63.78.183.70/CICS/CWBA/HVEJS?a=STREETADDRESS&c=&s=&z=ZIP&p=&d=&t=1&pt=1 (I put a space between in the url so that this board doesn't snip it) and see what you get. This is NOT html, so your browser wants to save it somewhere. Look at it via a text viewer. This is super easy to parse. If you get tricky, this is the only site that you need to pull data from. This will give you map coordinates and everything. So to sum up, this is 100 times easier than doing SSL, 10 times easier than parsing someone else's html and makes the project quick and easy.
|
| wondering
|
28
|
 |
|
04-14-2001 01:21 AM ET (US)
|
|
|
| Alan
|
29
|
 |
|
04-14-2001 11:58 AM ET (US)
|
|
instead of office hours on Monday (4/16), i'm going to have lab hours in the second floor lab, from 1pm-2pm. if you were planning on coming to regularly scheduled office hours at 9am, and you can't come to the lab at this new time, send me email.
|
| Alan
|
30
|
 |
|
04-14-2001 12:17 PM ET (US)
|
|
on the topic of the homeworth site, we now know a few things about the web server serving this content: - it uses SSL
- it checks for particular "user agents" (i.e. in most cases, this means your browser)
- it requires that the client store and return cookies
in order to handle these cases, we are in the process of making a web server with an enhanced version of PHP installed. the enhancement involves software called CURL ( http://curl.haxx.se/). this added functionality in the PHP language will allow you to deal with these complications. point your browser at http://www.php.net/manual/en/ref.curl.php for information on the PHP-CURL interface. you'll need to do at least the following tasks using this interface: - force the SSL version to version 2; the server doesn't appear to always correctly negotiate between version 2 and 3.
- tell CURL to follow URL redirections
- tell CURL to masquerade as an "acceptable" browser
- retrieve, store, and send cookies
if you take some time to learn the PHP-CURL interface, you'll be in good shape when the server is up.
|
| photon
|
31
|
 |
|
04-14-2001 03:53 PM ET (US)
|
|
Where is the cURL library installed in ieng9? I want to setup the cURL path, so I can use the functions. Thanks
|
| Alan
|
32
|
 |
|
04-14-2001 07:07 PM ET (US)
|
|
we're still in the process of setting up a web server with CURL-enabled PHP. this should be ready by Monday at the latest.
|
| Charles Elkan
|
33
|
 |
|
04-14-2001 07:40 PM ET (US)
|
|
The information provided by "It's Easy" is correct. Congratulations on discovering how the Homeadvisor site works! If you want to use this information source to do the project, that is fine. In this case, you should also pull maps from Yahoo and some interesting relevant information of your choice from an HTML source. Your project should demonstrate that you know how to do simple information extraction from HTML using regular expressions. If a house was last sold before 1996, it is ok that you don't have the sale price for it. Your recent comparable sale should always be from 2000 or 2001, and should have a known sale price. The Microsoft Homeadvisor site is an example of what not to do in web site design, for at least four reasons: (1) It does not work properly in Netscape browsers. (This may be deliberate Microsoft policy, for anti-competitive reasons.) (2) It is slow. In comparison, the basic GET operation from the server 63.78.183.70 is very fast. (3) The combination of server-side generated Javascript with style sheets and basic HTML is bad software engineering: tricky programming, with no clearly visible benefit. For example, house info should be packaged as XML, not Javascript. (4) Security is very weak. A determined programmer could take much more information from the server 63.78.183.70/CICS/CWBA than the owners of this data would want to release. CICS is IBM software that is over 30 years old that manages information transactions over a wide-area network. CWBA is the CICS web interface software that allows "legacy" CICS software to be used with web sites. For more info on CICS see http://www-4.ibm.com/software/ts/cics/
|
| Hector Jasso (TA)
|
34
|
 |
|
04-14-2001 08:16 PM ET (US)
|
|
******* PLEASE READ ******* A new discussion board replacing this one has been set up in DISCUS. The URL is: http://discus.ucsd.eduDISCUS supports threads, which should make everyone's life easier. This board (QuickTopic) will not be erased, but please start using Discus instead. I have set up sub-topics for: - General Questions - Project 1 - Project 2 - Project 3 - Tests Hector Jasso ******* PLEASE READ *******
|
| curious
|
35
|
 |
|
04-16-2001 02:01 PM ET (US)
|
|
The methods before and after don't seem to exist. Is there some sort of file we need to require? Or were you suggesting in the notes that we should write our own methods before and after to clean up our code?
$text = after("",$text); $title = before("",$text);
|
| Charles Elkan
|
36
|
 |
|
04-16-2001 06:14 PM ET (US)
|
|
You should write your own "before" and "after" functions using the builtin "split" or "explode" functions.
Or, there are alternative ways to use regular expressions for information extraction. Whatever strategy you choose, it should be well-organized and efficient, and as clear and simple as possible. One part of your report should be an explanation of your strategy for information extraction.
|
| pom
|
37
|
 |
|
04-28-2001 05:01 PM ET (US)
|
|
i just wanted to try quicktopic
|
| fda
|
38
|
 |
|
05-05-2001 06:02 PM ET (US)
|
|
Deleted by author 05-05-2001 06:03 PM
|