Jump to content

drisate

Members
  • Posts

    805
  • Joined

  • Last visited

Everything posted by drisate

  1. did you try ini_set('max_execution_time', 300); //300 seconds = 5 minutes
  2. This is quite easy actually. Open your .htaccess file and add the following line: SetEnv TZ location where location is the specific timezone you want to define. A list of Supported Timezones can be found here: http://www.php.net/manual/en/timezones.php
  3. Yeah th web is full of them http://www.php-mysql-tutorial.com/wikis/mysql-tutorials/insert-data-into-a-mysql-database.aspx Basacly you make a form and point the result to a php page <form action="page.php" method="POST"> Then page.php gets the vars of the form using $_POST[NAME] NAME is the name of the field <input type="text" name="username" size="20"> username would be the name Then you insert it into the database using this command $resultn = mysql_query("INSERT INTO table ('username') VALUE ('$_POST[username])")or die(mysql_error()); Of course you need to create your database first ... then your table ... then connect to the database. Find your self a tutorial and check it out in details. Good luck ;-)
  4. Umm you have an error in your code $po2=$rowf['friend'] you forgot ; $po2=$rowf['friend']; If you have error turned off if would result in a blank page ;-)
  5. why not just $string = str_replace('"', 'WHAT EVER YOU WANA REPLACE THE QUOTE FOR', $string); $string = str_replace("'", 'WHAT EVER YOU WANA REPLACE THE QUOTE FOR', $string);
  6. Nah you just need to create a local environement and test it on your PC like if it was a server. You need a PHP/Apache emulator with MySQL. I personly use UsbWebserver v7.0. It's a complete protable webserver
  7. i just told you you don't need to create php pages. $_GET is fine when creating virtual sub domains. Page profile.php?cid=USA would be the same as USA.domain.com
  8. I am not to good with regex coding ... but you should give it a try and ask in the Regex board. I am sur there's a guru that will respond in less then 24h. Regex board: http://www.phpfreaks.com/forums/index.php/board,43.0.html
  9. I would recomend more making virtual subdomains company.domain.com instead :-) You can do that using your root htaccess RewriteEngine On RewriteCond %{HTTP_HOST} !^www\.domain.com RewriteCond %{HTTP_HOST} ([^.]+)\.domain.com RewriteRule ^(.*)$ /profile.php?cid=%1 And of course you just need to generate pages like profile.php?cid
  10. Thx bro i actualy solved this by using htmlspecialchars on the title and utf8_encode on the body message Right now i am having a small prob with the attachement in this topic: http://www.phpfreaks.com/forums/index.php/topic,238295.0.html :-)
  11. Like this <?php $sql1 = mysql_query("SELECT * FROM `history` WHERE `user` = '$user1'") or die("Cannot select usage at this time."); $sql1_rows = mysql_num_rows($sql1); if($sql1_rows == "0") { echo 'No Usage Found'; } else { echo '<table width="100%" border="0" cellpadding="5" cellspacing="1" class="shared"> <tbody> <tr class="titles"> <th>Date</th> <th>Disk Usage</th> <th>Disk Limit</th> <th>Bandwidth Usage</th> <th>Bandwidth Limit</th> </tr>'; // Define first befor loop $row = "1"; while($invoices = mysql_fetch_array($sql1)) { echo '<tr '; //in your loop if($row==1){echo "class=\"first\"";$row="2";}else{echo "class=\"second\"";$row="1";} echo '> <td align="left">'.$invoices['date'].'</td> <td align="left">'.$invoices['disk_usage'].'</td> <td align="left">'.$invoices['disk_limit'].'</td> <td align="left">'.$invoices['bandwidth_usage'].'</td> <td align="left">'.$invoices['bandwidth_limit'].'</td> </tr>'; } echo '</table>'; } ?>
  12. // Define first befor loop $row = "1"; //in your loop if($row==1){echo "class=\"first\"";$row="2";}else{echo "class=\"second\"";$row="1";}
  13. Load the page into a var like this $content = file_get_contents('http://doerfler.gtamp.de/monitor/index2.php?ip=85.17.200.135&port=4800&ss=s&c=grey'); Then use some regex to get the stuff you need
  14. Last 10 $transaction = mysql_query("SELECT * FROM table order by id desc limit 10") or die (mysql_error()); while($trans = @mysql_fetch_array($transaction)){ echo $trans[id]."<br>"; } Same thing for 10 most popular $transaction = mysql_query("SELECT * FROM table order by popular dsc limit 10") or die (mysql_error()); while($trans = @mysql_fetch_array($transaction)){ echo $trans[id]."<br>"; }
  15. This is a print_r on $part stdClass Object ( [type] => 3 [encoding] => 3 [ifsubtype] => 1 [subtype] => VND.MS-POWERPOINT [ifdescription] => 0 [ifid] => 0 [bytes] => 6252438 [ifdisposition] => 1 [disposition] => attachment [ifdparameters] => 1 [dparameters] => Array ( [0] => stdClass Object ( [attribute] => filename [value] => =?ISO-8859-1?Q?France_Le_syst=E8me_qui_travaille_pour_vous=2E=2Eppt?= ) ) [ifparameters] => 1 [parameters] => Array ( [0] => stdClass Object ( [attribute] => name [value] => =?ISO-8859-1?Q?France_Le_syst=E8me_qui_travaille_pour_vous=2E=2Eppt?= ) ) ) As you can see thats how i receive the filename ...
  16. By the way ... the code above outputs a weird file name ... Ex: =?ISO-8859-1?Q?France_Le_syst=E8me_qui_travaille_pour_vous=2E=2Eppt?= (6.0MB) instead of only : France Le système qui travaille pour vous.ppt (6.0MB) Would be awsome to get that solved as well :-)
  17. Hey guys ... how do you transform an IMAP attachement into a viewable image? I would like to create 200px wide previews This is the code i have so fare to check if i have attachements. <?php $mbox = @imap_open("{mail.***.com:143/imap/notls}" . urldecode($_GET[folder]), $_SESSION['session_username'], $_SESSION['session_password']); // delibertely choose a message with an attachment $info = imap_fetchstructure($mbox, $_GET[num]); // find out how may parts the object has $numparts = count($info->parts); $i=1; // find if multipart message if ($numparts >1) { foreach ($info->parts as $part) { if ($part->disposition == "INLINE") printf("Inline message has %s lines<BR>", $part->lines); elseif ($part->disposition == "attachment") { $i++; print "<a href='?mod=mail&CMD=Attachview&num=$_GET[num]&part=$i'><img src='http://www.jce-ecp.com/html/images/trombone2.png' height='12'> ".$part->dparameters[0]->value." ".convsize($part->bytes)."</A><BR>"; } } } ?>
  18. Here's a good place to start http://www.w3schools.com/PHP/DEfaULT.asP Here's a free host http://www.free-webhosts.com/ (never tryed)
×
×
  • 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.