Jump to content

Deanznet

Members
  • Posts

    220
  • Joined

  • Last visited

Everything posted by Deanznet

  1. Hey! THAT WORKS! But one last question! And ill actually be done! Lets say i wanted to Only read maybe 30 LINES of that file and grab that info within 30 LINES. How can i do that ?
  2. Hey Okay That Works.. But my next question is after ttps:\/\/superman.com\/ their is 10 Characters such as ttps:\/\/superman.com\/1234567891 How can i also get those?
  3. The $search = 'https:\/\/superman.com\/'; Is Defining what its searching for. Im confused on how to capture the results..
  4. Hey! Need some help with my string search! I have been working on this script for a while but im STUCK! I have a FILE.txt Inside it has a bunch of random STUFF EXAMPLE: I made a script like this <?php $search = 'https:\/\/superman.com\/'; // Read from file $lines = file('file.txt'); echo"<html><head><title>SEARCH RESULTS FOR: $search</title></head><body>"; foreach($lines as $line) { // Check if the line contains the string we're looking for, and print if it does if(stristr($line,$search)) // case insensitive echo "<font face='Arial'> $line </font><hr>"; } ?> But it actually echos the whole LINE! PLUS i need it to actually grab 10 characters after the search string so i actually need it just to grab https:\/\/superman.com\/Jmd8KKtjIj - In THIS CASE it would of echoed it 3 TIMES since its 3 of them in their. Also any way i can FILTER out the extra slants it puts in ? https:\/\/superman.com\/Jmd8KKtjIj is suppose to be https://superman.com/Jmd8KKtjIj Thanks!
  5. Hey! Need some help with my string search! I have been working on this script for a while but im STUCK! I have a FILE.txt Inside it has a bunch of random STUFF EXAMPLE: I made a script like this. <?php $search = 'https:\/\/superman.com\/'; // Read from file $lines = file('file.txt'); echo"<html><head><title>SEARCH RESULTS FOR: $search</title></head><body>"; foreach($lines as $line) { // Check if the line contains the string we're looking for, and print if it does if(stristr($line,$search)) // case insensitive echo "<font face='Arial'> $line </font><hr>"; } ?> But it actually echos the whole LINE! PLUS i need it to actually grab 10 characters after the search string so i actually need it just to grab https:\/\/superman.com\/Jmd8KKtjIj - In THIS CASE it would of echoed it 3 TIMES since its 3 of them in their. Also any way i can FILTER out the extra slants it puts in ? https:\/\/superman.com\/Jmd8KKtjIj is suppose to be https://superman.com/Jmd8KKtjIj Thanks!
  6. I tried it.. Im having the hardest time doing this What i need the script basicly to do is. Make a folder in ../banner/images/FOLDERPOSTNAME also it has to edit a php file and add $uploadpath='../banner/images/FOLDERPOSTNAME '; Whats the best way
  7. I need help! I cant get this to write the correct way! What i need is based on the value of what is posted to the script it has to write it in the config file and also make a folder! Please help <?php $start = '$uploadpath=\''; $structure = '../banner/images/'.$_POST['FOLDER'].'\';\n'; $myFile = "PHP/confup.php"; $fh = fopen($myFile, 'w') or die("can't open file"); $stringData = "<?\n"; fwrite($fh, $stringData); $stringData = "$start $structure"; fwrite($fh, $stringData); $stringData = "?>\n"; fwrite($fh, $stringData); fclose($fh); // Desired folder structure // To create the nested structure, the $recursive parameter // to mkdir() must be specified. if (!mkdir($structure, 0777, true)) { die('Failed to create folders...'); } // ... ?>
  8. Okay! Everything works good in firefox! this here #meta{ float:right; padding:31px 70px 0 0 } #meta a{ color:#000000; text-decoration:underline; display:block; float:left } #meta a:visited{text-decoration:underline} #meta a:hover{text-decoration:none} #meta span{ padding:0 25px 0 0; float:left } #meta img{ float:left; margin:0 6px 0 0; } Works good! floats the the right in FIREFOX in IE7 it just stays to the left! also in firefox the page is centered! good IE7 stays to the left! html{ width:100%; height:100%; background-image:url(images/top_bg.gif); background-position:top left; background-repeat:repeat-x; } body{ width:995px; height:100%; margin:0 auto; background-image:url(images/top.jpg); background-position:top left; background-repeat:no-repeat; font-family:Arial; font-size:11px; color:#333333; }
  9. How do i make it stay in the center of the page!?!@ #header{ margin:0 auto; left:-12.9%; position:relative; text-align:left; width:696px; background:#00000; margin-bottom:0em; }
  10. Okay the page is structed like this. lets says i have a http://site.com/sdsddsa And it shows the following And it repeated again! I need the ITEMID number from the LISTING and the Price for the item ID number. Can anyone help please!
  11. How do i get this javascript code to work without clicking a button? Im trying to use it so i can echo the error in php ?
  12. I need to echo <link rel="stylesheet" type="text/css" href="css/style.css" /> But! i need it to check the mysql database if the row pagestyle is empty it will echo <link rel="stylesheet" type="text/css" href="css/style.css" /> If not then it will echo <link rel="stylesheet" type="text/css" href="css/style.<? echo $pagestyle; ?>.css" />
  13. How come my$_SERVER['PHP_SELF'] echos the filename.php I have a rewrite rule and i need it to echo http://site.com/file/321 instead of filename.php?id=321 Help! Godaddy wont tell me why its doing that
  14. Heres the full page. require_once 'includes/upload.class.php'; $upload = new uploads(); $details = $upload->getFileInformation($id); $id; preg_match("#/download/([\d]*)-#i", $_SERVER['PHP_SELF'], $id); $id = $id[1]; $details = $upload->getFileInformation($id); $encid = md5(time().mt_rand(101,887)); //echo $offer['id']; //print_r($_GET); <?php echo $details['upload_desc']; ?> I think i know the problem. preg_match("#/download/([\d]*)-#i", $_SERVER['PHP_SELF'], $id); My url looks like this. mysite.com/file/ID/title the other site looked like this othersite.com/download/ID-filename.txt So my question is how do i change preg_match("#/download/([\d]*)-#i", $_SERVER['PHP_SELF'], $id); to match mysite.com/file/ID/filename
  15. It wont bring any info up. just blank no errors. <?php echo $details['upload_desc']; ?> that should pull the text in the upload_desc table but it dosen't
  16. require_once 'includes/upload.class.php'; $upload = new uploads(); $details = $upload->getFileInformation($id); <?php echo $details['upload_desc']; ?> then here the class. require_once 'db.class.php'; class uploads extends database { private $uploadData; function uploadFile() { public function getFileInformation($id) { $this->uploadData = $this->readData("uploadfiles", "upload_id", $id); return $this->uploadData; } But it wont work!
  17. htaccess file dose work with other stuff! Whats the deal!
  18. Okay so i got this in my .htaccess so if i go to http://www.mysite.com/download/2998-Background_cell.png it should rewrite like http://www.mysite.com/download.php?id=2998 Works fine on my dedi host why not on shared!
  19. I am having problem with my edit.php page, Keep on getting Invalid argument supplied for foreach() My edit.php is suppose to get the drop down list from the first page. and replace the string [Replace] with whats in the list box But it has to Use the first thing in the list box 2 times, and ect. <form method="post" action="edit.php" > <select name="drop1"> <?php echo $dropdownOptions; ?> </select> <input type="submit" value="drop1" /> </form> Edit.php <? $file = file_get_contents('myfile.txt'); foreach($_POST['drop1'] as $replace) { $file = preg_replace('#\[Replace\]#', $replace, $file, 2); } ?>
  20. This is what i have.. I basicly need to take the Make and Model And Year Not the TYPE that needs to be left out and combine them into a drop down list. So example below would be like this Yamaha WR450F 2003-2006 Yamaha YZ450F 2003-2005 <table> <tr> <th>Type</th> <th>Make</th> <th>Model</th> <th class='tar'>Year</th> </tr> <tr class='even'> <td>Offroad</td> <td>Yamaha</td> <td>WR450F</td> <td class='tar'>2003-2006</td> </tr> <tr class='odd'> <td>Offroad</td> <td>Yamaha</td> <td>YZ450F</td> <td class='tar'>2003-2005</td> </tr> </table>
  21. Thats it right their? That simple huh?
×
×
  • 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.