loren646
Members-
Posts
52 -
Joined
-
Last visited
loren646's Achievements
Member (2/5)
0
Reputation
-
Can I data scrape / datamine data using PHP?
loren646 replied to loren646's topic in PHP Coding Help
Thanks. I'm going to do some reading up on this right now. -
Can I data scrape / datamine data using PHP?
loren646 replied to loren646's topic in PHP Coding Help
just text data. I can either put it in a mysql database or excel. it doesn't matter. i just want to automate it - rather than do it manually. -
Can I data scrape / datamine data using PHP?
loren646 replied to loren646's topic in PHP Coding Help
http://a810-bisweb.nyc.gov/bisweb/bispi00.jsp example (on row 1 of property search): Select "manhattan" Input "22" "west 11 st" Click "GO" ---- Click "complaints" then click each complaint and copy the disposition i.e. "01/26/2004 - A9 - ECB & BUILDINGS VIOLATIONS SERVED" -
I'm sure it's possible. I want to go to a website. Input values then copy and paste data it found from that search. Not even sure where to start.
-
thanks Sen
-
got three columns Table: Rentals: Columns: house number, street, owner. what's the coding? "SELECT owner FROM Rentals" Not sure what to write so i don't select duplicate owners. or is it better to select all and then when echo don't echo the duplicates?
-
Possible to send information through a link?
loren646 replied to loren646's topic in PHP Coding Help
is there a way to do this without adding it to the url? -
ANSWERED. It adds to the previous variable. appends.
-
$variable.= ??? why does the variable have the "." ? what does that mean?
-
while($row = mysql_fetch_array($result2)) { echo "<tr>"; echo "<td>" . $row['hotel'] . "</td>"; echo "<td>" . $row['hotelnum'] . "</td>"; echo "<td>" . $row['price'] . "</td>"; echo "<td align='center'>" . $row['bedroom'] . "</td>"; echo "<td>" . $row['descrip'] . "</td>"; echo "<td>" . $row['level1'] . "</td>"; echo "<td>" . $row['level2'] . "</td>"; echo "<td>" . $row['notes'] . "</td>"; ?> <td><A HREF="viewhotelnum.php" onClick="return popup(this, 'notes')">view</A></td> <?php echo "</tr>"; } echo "</table>"; mysql_close(); I want to send the $row['prim'] to the link viewhotelnum.php. This way when they click the link the viewhotelnum.php I can display the photos for that particular hotel room.
-
it's more than just the space. i tried changing the folder from 40 Allen to 40Allen it still outputs nothing. okay... i removed the first / and it seems to work. SOLVED
-
<img src="/pics/Dan/40 Allen/4/201232313_33.jpg" alt="40allen" width="400" height="400"><br> <?php $dir = "/pics/Dan/40%20Allen/4/*"; // Open a known directory, and proceed to read its contents foreach(glob($dir) as $file) { echo "filename: $file : filetype: " . filetype($file) . "<br />"; } $files = glob("/pics/Dan/40 Allen/4/*.{jpg,gif,png}", GLOB_BRACE); echo "yo yo".$files[0]; ?> I'm trying different ways using %20 and without using %20. Nothing seems to come up. The html works on top. It only prints the picture from the html and the "yo yo"
-
In case anyone else is having this problem. For future reference. I deleted all the white space. I guess the formatting caused problems. SOLVED.
-
<?php // Connects to your Database error_reporting(E_ALL); ini_set("display_errors", 1); mysql_connect("localhost", "xxxx", "xxxx") or die(mysql_error()); mysql_select_db("xxxx") or die(mysql_error()); //Checks if there is a login cookie if(isset($_COOKIE['ID_my_site'])) //if there is, it logs you in and directes you to the members page { $username = $_COOKIE['ID_my_site']; $pass = $_COOKIE['Key_my_site']; $check = mysql_query("SELECT * FROM users WHERE username = '$username'")or die(mysql_error()); while($info = mysql_fetch_array( $check )) { if ($pass != $info['password']) { } else { header("Location: members.php"); } } } //if the login form is submitted if (isset($_POST['submit'])) { // if form has been submitted // makes sure they filled it in if(!$_POST['username'] || !$_POST['pass']) { die('You did not fill in a required field.'); } // checks it against the database // if (!get_magic_quotes_gpc()) { // $_POST['email'] = addslashes($_POST['email']); // } $check = mysql_query("SELECT * FROM users WHERE username = '".$_POST['username']."'")or die(mysql_error()); //Gives error if user dosen't exist $check2 = mysql_num_rows($check); if ($check2 == 0) { die('That user does not exist in our database. <a href=areg.php>Click Here to Register</a>'); } while($info = mysql_fetch_array( $check )) { $_POST['pass'] = stripslashes($_POST['pass']); $info['password'] = stripslashes($info['password']); $_POST['pass'] = md5($_POST['pass']); //gives error if the password is wrong if ($_POST['pass'] != $info['password']) { die('Incorrect password, please try again.'); } else { // if login is ok then we add a cookie $_POST['username'] = stripslashes($_POST['username']); $hour = time() + 3600; setcookie(ID_my_site, $_POST['username'], $hour); setcookie(Key_my_site, $_POST['pass'], $hour); //then redirect them to the members area header("Location: members.php"); } } } else { // if they are not logged in ?> <form action="<?php echo $_SERVER['PHP_SELF']?>" method="post"> <table border="0"> <tr><td colspan=2><h1>Login</h1></td></tr> <tr><td>Username:</td><td> <input type="text" name="username" maxlength="40"></td></tr> <tr><td>Password:</td><td> <input type="password" name="pass" maxlength="50"> </td></tr> <tr><td colspan="2" align="right"> <input type="submit" name="submit" value="Login"> </td></tr> </table> </form> <?php } ?> added error checking. added "//" before the email part (not sure why that's in there.) These are now the current errors: Notice: Use of undefined constant ID_my_site - assumed 'ID_my_site' in login.php on line 60 Warning: Cannot modify header information - headers already sent by (output started at login.php:1) in login.php on line 60 Notice: Use of undefined constant Key_my_site - assumed 'Key_my_site' in login.php on line 61 Warning: Cannot modify header information - headers already sent by (output started at login.php:1) in login.php on line 61 Warning: Cannot modify header information - headers already sent by (output started at login.php:1) in login.php on line 65