Jump to content

tecdesign

Members
  • Posts

    33
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

tecdesign's Achievements

Member

Member (2/5)

0

Reputation

  1. I would love to build software which will help me automatically upload auctions to www.trademe.co.nz and www.zillion.co.nz. Is there anyway to remotely login to a website and go through the motions of posting data into their fields? Can anyone point me in the right direction?
  2. I tried the following script if(is_uploaded_file($_FILES['file']['tmp_name'])) { // file uploaded to server move_uploaded_file($_FILES['file']['tmp_name'], "/FILES/$username".$_FILES['form_image']['name']); } else { print ('<p class="bl"><strong>Unable to upload file.</strong></p><p>'); print_r($_FILES); print('</p>'); } With no luck, I have no trouble when working with linux hosting using php 4.4 although this is windows hosting using PHP 5
  3. How do you embed images into an email sent to a group so it looks just like an html web page? Any suggestions?
  4. COM is great the only problem is windows version of php is the only version which supports it and even worst most of the hosting companies who do have windows php usually don't support COM. Actually anyone out there know of a windows hosting service with php that supports COM?
  5. I can create a file to download to excel, but I would like to know if you can bold the excel sheet or make headers and change the width of the cells. If not feel free to say impossible in php. Cheers everyone.
  6. Ok after reading the COM section on php.net. You need to run php on a windows server for the COM classes to work.
  7. This is suppose to be a way $word = new COM("word.application") or die("Unable to instantiate Word"); $word->Documents->Open($filename); $new_filename = substr($filename,0,-4) . ".txt"; // the '2' parameter specifies saving in txt format $word->Documents[1]->SaveAs($new_filename,2); $word->Documents[1]->Close(false); $word->Quit(); $word->Release(); $word = NULL; unset($word); $fh = fopen($new_filename, 'r'); // this is where we exit Hell $contents = fread($fh, filesize($new_filename)); fclose($fh); unlink($new_filename); But I keep getting the error Cannot instantiate non-existent class: com in public_html/editor/word_count.php on line 28 Anyone know how to use the above code.
  8. I need to count the number of words in a microsoft word document. I have search the internet and so far no good. Anyone have any ideas?
  9. Does anyone know how to take the html code of an Iframe and read this code in a text box? Some examples of the code are here: function transfer_email() { var coding = iView.document.body.innerHTML; document.getElementById('email_area').innerHTML = coding; } <iframe id="iView" style="width: 415px; height:205px"> </iframe> <p> <input type="submit" name="Submit" value="Transfer to Email" onClick="transfer_email()"> </p> <p> <textarea name="textarea" cols="70" rows="15" id="email_area"></textarea> </p>
  10. I tried the following mysql query and it is not working $result = mysql_query("select * from $bank where username = '$username' ORDER BY $order DESC HAVING date_stamp >= $from AND date_stamp <= $to"); Any Suggestions
  11. I was using an older version of mysql (around 2. and this code worked fine.... $sql = mysql_query("INSERT INTO `members` ( `username` , `password` , `first_name` , `last_name` , `birthday` , `email_address` , `phone` , `fax` , `street_address` , `suburb` , `country` , `city` , `region` , `postcode` , `mobile` , `id` , `signup_date` , `last_login` , `photo` , `total_posts` ) VALUES ( '$username', '$password', '$first_name', '$last_name', '$birthday', '$email_address', '$phone', '$fax', '$street_address', '$suburb', '$country', '$city', '$region', '$postcode', '$mobile', NULL , NOW( ) , '00000000000000', 'nopic.gif', '0' )"); Now the code does not work, it doesn't give an error message it just does not insert the data into the database. Can someone out there help?
  12. I would like to read a csv file and upload the information into a database. I have started with the following code [code]$data = read_csv('transumm.csv','|'); for ( $i = 0; $i < count($data); $i++ ) { \\$sql = mysql_query("insert into transactions values (" for ( $u = 0; $u < count($data[$i]); $u++ ) {   echo $data[$i][$u].' ';   if($data[$i][$u] == end($data[$i]))   {   \\echo ");   } } } echo '<p>';  [/code]
  13. In a Mysql statement I want to read the variable as part of the mysql statement in the php coding. Is this possible? E.g $sql = mysql_query(" INSERT INTO `transactions` ( `transid` , `username` , `trans_type` , `trans_name` , `trans_method` , `ref` , `code` , `amount` , `date` ) VALUES ( NULL , 'asdf', '."$new_string".')");
  14. try this [code] $result=mysql_query ("SELECT UNIX_TIMESTAMP(mysql_column) as epoch_time FROM table"); $unix_timestamp = mysql_result ($result, 0, 0);                            echo date("F j, Y @ g:ia", $unix_timestamp); [/code] Search in the new snippet section also, they have a really good tutorial on this area. Big ups for the admin for creating the new section.
  15. [!--quoteo(post=384636:date=Jun 16 2006, 04:22 AM:name=wildteen88)--][div class=\'quotetop\']QUOTE(wildteen88 @ Jun 16 2006, 04:22 AM) [snapback]384636[/snapback][/div][div class=\'quotemain\'][!--quotec--] Or you can just use PHPs builtin function strtotime which converts the date into a unix timestamp, like so: [code]$result=mysql_query ("SELECT time_col FROM table"); $row = mysql_fetch_array($result); $date = date("F j, Y @ g:ia", strtotime($row['time_col'])); echo $date;[/code] [/quote] I've tried that and it doesn't seem to work for some reason... As it will just put the default date of 1970 or 1900 if you have php 5. My way seems to be successful in php 4.3.0
×
×
  • 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.