Jump to content

corbin

Staff Alumni
  • Posts

    8,102
  • Joined

  • Last visited

Everything posted by corbin

  1. Maybe he doesnt have a mysql database?  Lol if you do you should definatly use that... Faster and easier to read from...
  2. Ummmm... when you finalize the script you might wanna make sure you flat file is above the web root... http://piliffe.contrasthost.com/notemate/emaildb.txt lol
  3. It depeneds on a dynamic SQL query right?  which means sometimes result is gonna be empty... Or i could be wrong and it just needs to be if(mysql_num_rows($result) == "1") lol....... If that doesnt work i would just use if(@mysql_num_rows($result) == 1)
  4. Uhhhh... For it to out put on any page besides its self it will need to be included and then the function called on that page.
  5. Oh.  I know nothing about about apache 1.3, much less on mac... Hmmm...
  6. Uhhhhhh I just glanced through the rest of the script so there might be another problem... But i think $db = mysql_select_db(db173735005); should be $db = mysql_select_db('db173735005');
  7. Probably.  If you could post the script where the sessions are set that would help :D
  8. Yeah, that uhhh makes no sense...
  9. Theyre all porportional so you could just have them all as x by y no matter what... It would look kinda wierd on some of em but youre site would end up lookin better anyways... Someone might think its funny to upload some 2000x2000 file... making the page its on look like crap...
  10. I would make directory listings unavailable where it would generate uhhh 403 (?) errors... then you could just use an appropriate error document... Possibly having it redirct the user to /index
  11. Its my personal favorite... Theres some other methods but md5 is the most common...
  12. So their login key is pretty much a password your script generates right?  Anyways you could just make it md5 the entire userid-login key thing then just compare the userid-login key in the cookie or in a form in a login script to the database one...
  13. I'm not saying this in a mean sense towards any one, but thats prolly a bad idea... lol
  14. uhhhh the login script... what does it set?  As long as you keep 1 window of IE open it retains a session if i remember correctly... So In theory it should stay logged in...
  15. haha sorry but your title made me laugh. Anyways i dont get what youre trying to do...? if youre just tryin to set new values you can just use something like $array = array(); $array[] = "value1"; $array[] = "value2"; $array[] = "value3"; $array[] = "value4"; Then array[0] would be value1 [1] would be value2 and so on..........
  16. [code=php:0] <? $html = $_POST['html']; if($_POST['submit']) { $file = "files/" . $username . "_" . mt_rand() . ".html"; while(file_exists($file)) { $file = "files/" . $username . "_" . mt_rand . ".html"; } $handle = fopen($file, "w+"); if(fwrite($handle, $html)) { echo "Your file was successfully written to " . $file; } fclose($handle); } if(!$_POST['submit']) { ?> <form action="" method=POST> <textarea cols="25" rows="10" name="html"></textarea><BR> <input type="submit" name="submit" value="Create"> <? } ?> [/code] Very simple script.  Creates a file after making sure it doesnt already exist and adds the form input into the file.  Itll create a file like bob_34820481234.html if the users name is bob... It will then tell the user what the name of the file is once its created... you could easily have it output one of the $_SERVER vars along with $file so that it would be the full url to the file...
  17. I dont see them... And what do you mean reinstall macromedia?! Its put there with a <img> tag... Marcromedia has no effect over that at ALL what so ever...
  18. [quote author=logged_with_bugmenot link=topic=103805.msg413611#msg413611 date=1155269175] I have a site where users can upload video to their posts. I then display this video using the <embed> tag. [code]<embed src="video.wmv">[/code] Any video format is allowed. The problem is that I don't know how to get the height and width of the video with PHP. Without defining height="x" and width="x", the video shows up very small. I don't want to use a static height and width in my embed tag. So how can I get the dimensions of a video with PHP, or what alternative is there to make the video show up in the page with the correct size? [code]<embed src="video.wmv" height="???" width="???">[/code] [/quote] It wasnt me asking the question.  I'm sorry if you misunderstood my 'ansaw'
  19. [code=php:0] <SCRIPT LANGUAGE="JavaScript"> function openpic1()       { OpenWindow=window.open("", "newwin", "height=600, width=800,toolbar=no,scrollbars="+scroll+",menubar=no"); OpenWindow.document.write("<BODY BGCOLOR=black leftmargin=0 topmargin=0 rightmargin=0 bottommargin=0>") OpenWindow.document.write("<IMG SRC=\"upload/<?php echo("$jc"); echo "1.jpg"; ?>\" height=\"PUT AN ACTUAL HEIGHT HERE OR JUST DELETE THIS HEIGHT TAG\">") OpenWindow.document.write("</BODY>") OpenWindow.document.write("</HTML>") OpenWindow.document.close() self.name="main"     } </SCRIPT> <?php if($oneisthere > 0) { echo "<td class=\"mid\" align=\"left\"><img src=\"upload/"; echo $jc . "1.jpg" onClick=\"openpic1();\" width=\"120\" height=\"90\"></td>"; } ?> [/code] Try that and see if it works any better
  20. I dont think hes having an issue with that aspect of it... I think hes having trouble cuz he needs to know the width and height of the file...
  21. Wait... youre using a script tag for php? just use <?php php code here ?>
  22. You could use something like while(file_exists($filename)) { $filename = mt_rand() . ".html"; } Then the page they created could be returned to them in a link... Or maybe if you stored pages vs usernames in a database they could look up alll the pages they created...
  23. You could use a reversable encryption method... That would almost as point less as no encryption though...  Funny thing is, i discovered my ISP's webmail site had the flaw of encrypting a username in a cookie... But no password so someone could just make a md5 username put it in the right cookie and be in as someone else... Bout 3 days after i figured that out their webmail site changed :D How does your login script and you script that creates the cookie work?
  24. im assuming you copied and pasted [code=php:0] <?php /*   $Id: shipping.php,v 1.4 2002/11/19 01:48:08 dgw_ Exp $   osCommerce, Open Source E-Commerce Solutions   http://www.oscommerce.com   Copyright (c) 2002 osCommerce   Released under the GNU General Public License */ define('NAVBAR_TITLE', 'Media'); define('HEADING_TITLE', 'Media & Download'); define('TEXT_INFORMATION', ' <p>Full Albums</p> <a target="_blank" href="media/ATTWTB_full.zip"> <img border="1" src="images/attwtb.png" width="150" height="150">[/url]&nbsp; <a target="_blank" href="http://www.sendspace.com/file/vqdtnt.zip"> <img border="1" src="images/cover.png" width="150" height="150">[/url]&nbsp; <a target="_blank" href="http://www.sendspace.com/file/vqdtnt.zip"> //Third Image <img border="1" src="images/cover.png" width="150" height="150">[/url] //Third Image <p>Picture Of Acebeatz</p> <a target="_blank" href="images/acebeatz_3.png"> <img border="1" src="images/acebeatz_4.png" width="50" height="75">[/url]&nbsp; <a target="_blank" href="images/acebeatz_2.png"> <img border="1" src="images/acebeatz_1.png" width="50" height="69">[/url]&nbsp; <a target="_blank" href="images/acebeatz_6.png"> <img border="1" src="images/acebeatz_5.png" width="50" height="75">[/url]&nbsp; <a target="_blank" href="images/acebeatz_9.png"> <img border="1" src="images/acebeatz_11.png" width="50" height="70">[/url]&nbsp; <a target="_blank" href="images/acebeatz_8.png"> <img border="1" src="images/acebeatz_7.png" width="50" height="79">[/url]'); ?> [/code] exactly? I think the forums just parsed [code]</a>[/code] as the [code][/url][/code] try [code=php:0] <?php /*   $Id: shipping.php,v 1.4 2002/11/19 01:48:08 dgw_ Exp $   osCommerce, Open Source E-Commerce Solutions   http://www.oscommerce.com   Copyright (c) 2002 osCommerce   Released under the GNU General Public License */ define('NAVBAR_TITLE', 'Media'); define('HEADING_TITLE', 'Media & Download'); define('TEXT_INFORMATION', ' <p>Full Albums</p> <a target="_blank" href="media/ATTWTB_full.zip"> <img border="1" src="images/attwtb.png" width="150" height="150"></a>&nbsp; <a target="_blank" href="http://www.sendspace.com/file/vqdtnt.zip"> <img border="1" src="images/cover.png" width="150" height="150"></a>&nbsp; <a target="_blank" href="http://www.sendspace.com/file/vqdtnt.zip"> //Third Image <img border="1" src="images/cover.png" width="150" height="150"></a> //Third Image <p>Picture Of Acebeatz</p> <a target="_blank" href="images/acebeatz_3.png"> <img border="1" src="images/acebeatz_4.png" width="50" height="75"></a>&nbsp; <a target="_blank" href="images/acebeatz_2.png"> <img border="1" src="images/acebeatz_1.png" width="50" height="69"></a>&nbsp; <a target="_blank" href="images/acebeatz_6.png"> <img border="1" src="images/acebeatz_5.png" width="50" height="75"></a>&nbsp; <a target="_blank" href="images/acebeatz_9.png"> <img border="1" src="images/acebeatz_11.png" width="50" height="70"></a>&nbsp; <a target="_blank" href="images/acebeatz_8.png"> <img border="1" src="images/acebeatz_7.png" width="50" height="79"></a>'); ?> [/code]
  25. Hmmm looks like it could be good... Im downloading it right now :D
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.