Tuesday 22 December 2015

paypal sandbox

paypal sandbox account testing -

1.  mm001-buyer@gmail.com
    mmbuyer123
 
2.  mm-seller@gmail.com
    mmseller

Wednesday 9 December 2015

how to Recover password script in php

<?php
session_start();
include('include/config.php');
include('include/header.php');
include_once("log_usr/cl_ne/classes/class.messages.php") ;
//include_once("classes/db_table_details.php");
include_once("log_usr/cl_ne/classes/functions.php");
include_once("log_usr/cl_ne/classes/class.validation.php");

    if (isset($_POST['username'])){

        $username = $_POST['username'];

        $query="select * from book_user_reg where book_user_email='$username'";

        $result   = mysqli_query($con,$query);

        $count=mysqli_num_rows($result);

        // If the count is equal to one, we will send message other wise display an error message.

        if($count==1)

        {

            $rows=mysqli_fetch_array($result);

            $pass  =  $rows['book_user_pwd'];//FETCHING PASS

            //echo "your pass is ::".($pass)."";

            $to = $rows['book_user_email'];

            //echo "your email is ::".$email;

            //Details for sending E-mail

            $from = "Coding Cyber";

            $url = "http://writeup.ecoveretail.com/";

            $body  =  "Coding Cyber password recovery Script

            -----------------------------------------------

            Url : $url;

            email Details is : $to;

            Here is your password  : $pass;

            Sincerely,

            Coding Cyber";

            $from = "manjeet@ecovesolutions.com";

            $subject = "CodingCyber Password recovered";

            $headers1 = "From: $from\n";

            $headers1 .= "Content-type: text/html;charset=iso-8859-1\r\n";

            $headers1 .= "X-Priority: 1\r\n";

            $headers1 .= "X-MSMail-Priority: High\r\n";

            $headers1 .= "X-Mailer: Just My Server\r\n";

            $sentmail = mail ( $to, $subject, $body, $headers1 );

        } else {

        if ($_POST ['email'] != "") {

        echo "<span style='color: #ff0000;'> Not found your email in our database</span>";

            }

            }

        //If the message is sent successfully, display sucess message otherwise display an error message.

        if($sentmail==1)

        {

            echo "<span style='color: #ff0000;'> Your Password Has Been Sent To Your Email Address.</span>";

        }

            else

            {

            if($_POST['email']!="")

            echo "<span style='color: #ff0000;'> Cannot send password to your e-mail address.Problem with sending mail...</span>";

        }

    }

    ?>
<html>

    <head>

    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

    <title>Home: Webpage</title>

    </head>

    <body>
<div class="container">
    <form action="" method="post">

            <label> Enter your User ID : </label>

            <input id="username" type="text" name="username" />

            <input id="button" type="submit" name="button" value="Submit" />

        </form>
</div>
    </body>

    </html>
<?php include('include/footer.php'); ?>

Tuesday 3 November 2015

how to set wordpress menu

Click here 

http://code.tutsplus.com/tutorials/how-to-integrate-bootstrap-navbar-into-wordpress-theme--wp-33410

Saturday 31 October 2015

how to use Curl Fatch data in other website

<?php

function curl_download($Url){
 
    if (!function_exists('curl_init')){
        die('cURL is not installed. Install and try again.');
    }
 
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, $Url);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    $output = curl_exec($ch);
    curl_close($ch);
    $start = strpos($output, '<h2 id="logo">cfghvbbv</h2>');
$end = strpos($output, '<p>', $start);
$length = $end-$start;
$output = substr($output, $start, $length);
   
   
   
   
 
    return $output;
}

print curl_download('http://www.gutenberg.org/browse/scores/top');

?>

Web Service in php

<?php 
  /* soak in the passed variable or set our own */
  $format = strtolower($_GET['format']) == 'json' ? 'json' : 'xml'; //xml is the default
  /* connect to the db */
  $link = mysql_connect('localhost','envisiy9_update','T?pAT*{nC58E') or die('Cannot connect to the DB');
  mysql_select_db('envisiy9_SiteCMS',$link) or die('Cannot select the DB');
  /* grab the posts from the db */
  $query = "SELECT * FROM artists";
  $result = mysql_query($query,$link) or die('Errant query:  '.$query);
  /* create one master array of the records */
  $posts = array();
  if(mysql_num_rows($result)) {
    while($post = mysql_fetch_assoc($result)) {
      $posts[] = array('a_id'=>$post['a_id'],'artist_name'=>htmlentities($post['artist_name']));
    }
  }
  /* output in necessary format */
  if($format == 'json') {
   header('Content-type: application/json');
    echo json_encode(array('posts'=>$posts));
  }
  else {
    //header('Content-type: text/xml');
    echo '';
    foreach($posts as $index => $post) {
      if(is_array($post)) {
        foreach($post as $key => $value) {
          echo '<',$key,'>';
          if(is_array($value)) {
            foreach($value as $tag => $val) {
              echo '<',$tag,'>',htmlentities($val),'</',$tag,'>';
            }
          }
          echo '</',$key,'>';
        }
      }
    }
    echo '';
  }
  /* disconnect from the db */

?>


///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

web service 2:

<?php 
  $link = mysql_connect('localhost','root','') or die('Cannot connect to the DB');
  mysql_select_db('angelfi4_cart',$link) or die('Cannot select the DB');
  /* grab the posts from the db */
  $query = "SELECT * FROM artists";
  $result = mysql_query($query,$link) or die('Errant query:  '.$query);
  /* create one master array of the records */
  $posts = array();
   $arts =array();
  if(mysql_num_rows($result)) {
    while($post = mysql_fetch_assoc($result)) {
   
     $query2 = "SELECT * FROM art where artist='".$post['a_id']."'";
     $result2 = mysql_query($query2,$link) or die('Errant query:  '.$query2);
    while($art = mysql_fetch_assoc($result2)) {
      $arts[] = array('image'=>'http://69.195.124.130/~envisiy9/manager/pictures/'.$art['image'],'price'=>htmlentities($art['price']),'title'=>htmlentities($art['title']),'dimensions'=>htmlentities($art['dimensions']));
    }

     $posts[] = array('a_id'=>$post['a_id'],'artist_name'=>htmlentities($post['artist_name']),'arts'=>$arts);
    
    }
  }
 
echo "<pre>";
print_r($posts);
 //header('Content-type: application/json');
 //echo json_encode(array('posts'=>$posts));



?>


how to create Patern of traingal

<?php


for($a=0; $a<=5; $a++)
{
for($b=1; $b<=$a; $b++)
{
echo "$b&nbsp;";
}
echo "<br>";
}


?>



Output :

 1
1 2
1 2 3
1 2 3 4
1 2 3 4 5


/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

count code :


<?php
//$num=200;

for($i = 200; $i <= 592; $i+=8)
    {
        echo $i.',';
    }
    echo $i;
 
?>

how to get text from image

Get text from image Click here


http://www.convertimagetotext.net/imagetotextconverter.php

Thursday 15 October 2015

Website Link

  1. http://jamrockone.com/  (php)
  2. http://onlinedesigncontest.com/ (php)
  3. http://www.webdesignit.se/en/ (wordpress)
  4. http://runbeerfit.com (wordpress)