Tag Archives: PHP

PHP – read CSV file into an array and create files from an array

<?php $file = fopen(‘files.csv’, ‘r’); while (($line = fgetcsv($file)) !== FALSE) {  foreach ($line as $value) {    echo($value.'<br>’); $HTMLFile = fopen($value.’.html’,”w”); $TextFile = fopen($value.’.txt’,”w”); fwrite($HTMLFile,$value); fwrite($TextFile,$value);  }  } fclose($file); ?>

Posted in PHP/MySQL | Tagged , , , , | Comments Off on PHP – read CSV file into an array and create files from an array

PHP – create files from an array

<?php $files_to_create = array(EM_NEO_TIPS_06501,EM_NEO_TIPS_06502,EM_NEO_TIPS_06503,EM_NEO_TIPS_06504,EM_NEO_TIPS_06505,EM_NEO_TIPS_06506,EM_NEO_TIPS_06507,EM_NEO_TIPS_06508,EM_NEO_BABYDEV_02501,EM_NEO_BABYDEV_02502,EM_NEO_BABYDEV_02503,EM_NEO_BABYDEV_02504,EM_NEO_BABYDEV_02505,EM_NEO_BABYDEV_02506,EM_NEO_BABYDEV_02507,EM_NEO_BABYDEV_02508,EM_NEO_JRNY_01501,EM_NEO_JRNY_01502,EM_NEO_JRNY_01503,EM_NEO_JRNY_01504,EM_NEO_JRNY_01505,EM_NEO_JRNY_01506,EM_NEO_JRNY_01507,EM_NEO_JRNY_01508,EM_NEO_LOY_03501,EM_NEO_LOY_03502,EM_NEO_NUTR_04501,EM_NEO_NUTR_04502,EM_NEO_NUTR_04503,EM_NEO_NUTR_04504,EM_NEO_NUTR_04505,EM_NEO_NUTR_04506,EM_NEO_NUTR_04507,EM_NEO_NUTR_04508,EM_NEO_PROD1_05501,EM_NEO_PROD1_05502,EM_NEO_PROD1_05503,EM_NEO_PROD1_05504,EM_NEO_PROD1_05505,EM_NEO_PROD1_05506,EM_NEO_PROD1_05507,EM_NEO_PROD1_05508); foreach ($files_to_create as $value) {    echo($value.'<br>’); $HTMLFile = fopen($value.’.html’,”w”); $TextFile = fopen($value.’.txt’,”w”); fwrite($HTMLFile,$value); fwrite($TextFile,$value);} ?>

Posted in PHP/MySQL | Tagged , , | Comments Off on PHP – create files from an array

Get absolute path of website using PHP

<?php $path = getcwd(); echo “This Is Your Absolute Path: “; echo $path; ?>

Posted in PHP/MySQL | Tagged , , | Comments Off on Get absolute path of website using PHP

How To Start Your Own PHP MVC Framework In 4 Steps?

http://phpocean.com/tutorials/back-end/how-to-start-your-own-php-mvc-framework-in-4-steps/28

Posted in PHP/MySQL | Tagged , , | Comments Off on How To Start Your Own PHP MVC Framework In 4 Steps?

Send Email Using SMTP And PHP Mailer

Nice tut: Send Email Using SMTP And PHP Mailer http://talkerscode.com/webtricks/send-email-using-smtp-and-php-mailer.php

Posted in PHP/MySQL | Tagged , , , , | Comments Off on Send Email Using SMTP And PHP Mailer

How to view your server PHP settings – phpinfo()

<? phpinfo(); ?>

Posted in PHP/MySQL | Tagged , , | Comments Off on How to view your server PHP settings – phpinfo()

Sending mixed-type messages with PEAR::Mail_Mime

Sending mixed-type messages with PEAR::Mail_Mime

Posted in PHP/MySQL | Tagged , , , , | Comments Off on Sending mixed-type messages with PEAR::Mail_Mime

PHP – read text file and get contents

<?php $myfile = fopen(“file-to-read.txt”, “r”) or die(“Unable to open file!”); // Output one line until end-of-file while(!feof($myfile)) { echo fgets($myfile) . “<br>”; } fclose($myfile); ?>

Posted in PHP/MySQL | Tagged , | Comments Off on PHP – read text file and get contents

Serious Form Security with PHP from CSS-Tricks

I great PHP article on for security. Besides stripping tags and CAPTCHA type checks, it also using a token matching system and creating a white list, and hack log.  https://css-tricks.com/serious-form-security/

Posted in PHP/MySQL | Tagged , , , | Comments Off on Serious Form Security with PHP from CSS-Tricks

PHP crypt() – Using PHP encryption methods

I had not done any user registration type stuff in the past and needed to figure this out. I wanted to store an encrypted password in a database, and then be able to compare a submitted pw at login. I … Continue reading

Posted in PHP/MySQL | Tagged , , | Leave a comment