Jump to content

$username

Members
  • Posts

    159
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

$username's Achievements

Member

Member (2/5)

0

Reputation

  1. I ran into an issue running cmds through shell_exec. When you trigger a shell_exec it will open the exe as the Apache service user. By default Apache installs as a local system account. So if you need to connect to a remote server to run a cmd it will hang in the task manager. example shell_exec("psexec \\\\remoteComputer -i -d -s dnscmd /zoneadd domain.com /primary") When a cmd needs to access other servers you will need to make the Apache service run as a user that has access to other remote servers. http://httpd.apache.org/docs/2.2/platform/windows.html See the section about running Apache as a service This may not work for all cases but it seems to work for my issues when running cmds that needed more privileges -Brett
  2. Found it!! $str = '312.test.com'; echo substr_count($str, "."); This will return the number of times it is in the string,.
  3. If I am am now looking to count the number of '.' and if there is only 1 I would bypass the $trimed = substr($strg, strpos($strg,'.')+1); How can I count the '.' in a string? Thanks, Currently looking in php docs.
  4. Damn that is awesome... I would have never got that +1 Thanks!
  5. Hello All, So I am stuck and not sure what function would work best for my case. I have this value $strg = "test.example.com"; I want to remove the 'test.' from the string so that it is just 'example.com' I started to look at ltrim function. But I am not sure how I would read it from left to right till it got to the first '.'. $trimmed = ltrim("test.example.com", " '"*".'); If you have any help or a better way please let me know.. Thanks
  6. Hey Guys, I am a little lost at this. I want to check to make sure the @ symbol is in the string. Here is what I have } else if($submit && empty($ContactEmail) && strspn('@', $ContactEmail)) { echo "<h4>You need to enter Email</h4> <br /> <a href=\"javascript:history.go(-1)\" onMouseOver=\"self.status=document.referrer;return true\">BACK</a> "; This does nothing. It just goes to the next string. Is there a better way to check for a character Thanks,
  7. Thanks F1Fan that is what I was looking for. Brett
  8. onClick is java. Try doing a search on this to see if it could help you. Brett
  9. Hello All, I am trying to find out how to display text from MySQL that was entered by using a textbox HTML So when I do a echo echo from a database field that had text entered from a text field it does not add the spaces and return lines. But when I echo it in to a html text box it does display the return characters. Does this makes sence and is there a way to make this work? Thanks Brett
  10. I want the value of $MsgBody = to echo "<table>"; while($row589 = mysql_fetch_array($sql589)) { echo "<tr>"; echo "<td>".$row589['PaymentInvoiceID']."</td>"; echo "<td>".$row589['PaymentDueDate']."</td>"; echo "<td>".$row589['PaymentPaid']."</td>"; echo "<td>".$row589['PaymentAccountID']."</td>"; echo "</tr>"; } echo "</table>";
  11. Hello All, I am setting up some email sending with PHP pulling info from MySQL. I have one question on how to make the message body. Here is the code I have. What is the key to getting the PHP loop to be equal to a value. $ToMail = 'bjanzen@nextechworks.com'; $MsgSubject = "Daily Invoices Due"; $MsgBody = ( echo "<table>"; while($row589 = mysql_fetch_array($sql589)) { echo "<tr>"; echo "<td>".$row589['PaymentInvoiceID']."</td>"; echo "<td>".$row589['PaymentDueDate']."</td>"; echo "<td>".$row589['PaymentPaid']."</td>"; echo "<td>".$row589['PaymentAccountID']."</td>"; echo "</tr>"; } echo "</table>" );
  12. New Code But new error <?php include 'dbconnect.php'; $sql = "SELECT * FROM DBM350_FGFAXOUT WHERE MSN = '22'"; $result = maxdb_query($link, $sql) or die(maxdb_error()); list($DIST_FILE) = maxdb_fetch_array($result); header("Content-Disposition: attachment; filename=test"); header("Content-length: 55"); header("Content-type: tif"); Echo "$DIST_FILE"; ?> <br /> <b>Warning</b>: maxdb_fetch_array() [<a href='function.maxdb-fetch-array'>function.maxdb-fetch-array</a>]: Column/Parameter 111 truncated. in <b>C:\Inetpub\wwwroot\work\dl.php</b> on line <b>7</b><br />
  13. Hello All, I am working on a extracting info from maxdb. Right now I would like to test this to see if I can build something to view info in this database. There is this field called "DIST_FILE" This a long byte column in maxdb. To my knowledge this is in b64 encoding. //select the info $sql = maxdb_query("SELECT DIST_FILE FROM DBM350_FGFAXOUT WHERE MSN = '22'"); $file = maxdb_fetch_assoc($sql); //decode the field $filedl = base64_decode($file); //Set header for download header("Content-Disposition: attachment; filename=test"); echo "$filedl"; Does this look even close to something to download the data? Thank you, Brett
×
×
  • 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.