Вход Регистрация
Файл: documentation/index.html
Строк: 490
<?php
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<
head lang="en">
    <
meta http-equiv="content-type" content="text/html;charset=utf-8">
    <
title>Documentation</title>
    <
link rel="stylesheet" type="text/css" href="css/style.css" />
    <
script type="text/javascript" src="js/jquery-1.7.1.min.js" ></script>
    <
script type="text/javascript">
    $(function(){
        var 
tocposition;
        
// toc = table of contents

        
$(".nav ol li a").click(function(){
            $(
".nav ol li").removeClass('active');
            
            
hlink = $(this).attr("href");
            
            
position  = $(hlink).position().top;
            $(
'html, body').animate({scrollTop:position}, 'slow');
            $(
this).parent().addClass('active');
            return 
false;
            });
    });
    </
script>
</
head>
<
body>
<
div class="wrapper">
    <
div class="content clearfix">
        
    <
div class="nav">
            <
div class="about">
                <
h1>iShort<span>Useful PHP Functions</span></h1>
                
                <
span><strong>Created09 Oct 2014</strong></span>
                <
span>By: <a href="http://codecanyon.net/user/apyazilim">AP Yazılım</a></span>
                <
span>Support: <a href="http://codecanyon.net/user/apyazilim">Text Message</a> </span>

            </
div>
        <
ol>
            <
li class="active">
            <
a href="#01">How to include?</a></li>
            <
span class="func">Functions Using</span>
            <
li><a href="#02">Share</a></li>
            <
li><a href="#03">Weather</a></li>
            <
li><a href="#04">Tag Cloud</a></li>            
            <
li><a href="#05">Youtube Vimeo</a></li>            
            <
li><a href="#06">Gravatar</a></li>            
            <
li><a href="#07">Human Time Ago</a></li>            
            <
li><a href="#08">CSS3 Animated Links</a></li>            
            <
li><a href="#09">Contact Form</a></li>            
            <
li><a href="#10">Facebook Like Box</a></li>                
            <
li><a href="#11">MySQL Insert</a></li>                
            <
li><a href="#12">Google QR Code</a></li>                
            <
li><a href="#13">Check File Extension</a></li>                
            <
li><a href="#14">Make Clickable</a></li>                
            <
li><a href="#15">Login Authentication</a></li>                
            <
li><a href="#16">Get Site Source Code</a></li>                
            <
li><a href="#17">Cleans Text</a></li>                
            <
li><a href="#18">Checking Images</a></li>                
            <
li><a href="#19">Redirecting url</a></li>                
            <
li><a href="#20">Listing files</a></li>                
            <
li><a href="#21">Random Password</a></li>                
            <
li><a href="#22">Shortens URL</a></li>                
            <
li><a href="#23">Truncates Text</a></li>                
            <
li><a href="#24">Connect Database</a></li>                
            <
li><a href="#25">Make Thumb Image</a></li>                
            <
li><a href="#26">Clean Turkish Chars</a></li>                
            <
li><a href="#27">Regards</a></li>                
      </
ol>
      </
div>
  
  
  <
div class="documentation">
  

<
div id="01">
<
h2 class="name">01 <span>How to include?</span></h2>

<
div class="boxparam">
<
class="boxinner">So easy just follow the informations.</p>
<
div class="boxinnerparam">
<
p>Find &lt;head&gttag and paste this code to that case.
<
code>&lt;head&gt;
&
lt;!-- Start Copy --&gt;

  &
lt;script src=&quot;iShort/js/jquery-latest.min.js&quot;&gt;&lt;/script&gt;
  &
lt;script src=&quot;iShort/js/script.js&quot;&gt;&lt;/script&gt;
  &
lt;link href=&quot;iShort/css/style.css&quotrel=&quot;stylesheet&quot;  media=&quot;screen&quottype=&quot;text/css&quot; /&gt;
  
  &
lt;?php include 'ishort-functions.php'; ?&gt;
  
 &
lt;!-- Finish Copy --&gt;
    &
lt;/head&gt;<br>
    </
code> <br>
 
Note: If you have jquery.js in your server do not include that case on code...
<
br><br>


 </
div>
</
div>

</
div>

  <
div id="02">
  <
h2 class="name">02 <span>Share</span></h2>

<
div class="boxparam">
<
class="boxinner"><strong>Only put this code to anywhere of php file</strong></p>
<
div class="boxinnerparam">
<
code>
php_share_with_count($actual_link);
</
code>
<
img src="images/sample_01.gif" />
<
br><br>
</
div>
</
div>


</
div>
  <
div id="03">
  <
h2 class="name">03 <span>Weather</span></h2>

<
div class="boxparam">
<
class="boxinner"><strong>Only put this code to anywhere of php file</strong></p>

<
div class="boxinnerparam">
<
code>
 
php_weather_ap("citycode""rain / cloudy / sunny / snow / stormy")
 
</
code>
<
img src="images/sample_02.gif" />
<
br><br>
</
div>
</
div>


</
div>

  <
div id="04">
  <
h2 class="name">04 <span>Tag Cloud</span></h2>

<
div class="boxparam">
<
class="boxinner"><strong>Only put this code to anywhere of php file</strong></p>
<
div class="boxinnerparam">
<
code>
$alltags = array('Actionscript' => 35'Adobe' => 22'Array' => 44'Background' => 43
    
'Blur' => 18'Canvas' => 33'Class' => 15'Color Palette' => 11'Crop' => 42
    
'Delimiter' => 13'Depth' => 34'Design' => 8'Encode' => 12'Encryption' => 30
    
'Extract' => 28'Filters' => 42);
    
    
php_make_tag_cloud($alltags"link query","Tag Colors"); 
    
    
//Colors: blue / orange / red / gray
    
</code>
<
img src="images/sample_03.gif" />
<
br><br>
</
div>
</
div>


</
div>

  <
div id="05">
  <
h2 class="name">05 <span>Youtube Vimeo</span></h2>

<
div class="boxparam">
<
class="boxinner"><strong>Only put this code to anywhere of php file</strong></p>
<
div class="boxinnerparam">
<
code>
php_video_embed("Youtube Link""Video Width");
php_video_embed("Vimeo Link""Video Width");

You can control autoplay or loop if you dont want live it blank like up side.
php_video_embed($url=""$width=500$autoplay=FALSE$loop=FALSE)
</
code>
<
img src="images/sample_05.gif" />

<
br><br>
</
div>
</
div>


</
div>

  <
div id="06">
  <
h2 class="name">06 <span>Gravatar</span></h2>

<
div class="boxparam">
<
class="boxinner"><strong>Only put this code to anywhere of php file</strong></p>
<
div class="boxinnerparam">
 <
code>
get_gravatar("your email address","size");
 </
code
<
br> <br>
  <
img src="images/sample_06.gif" /> 
 </
div>
</
div>


</
div>

  <
div id="07">
  <
h2 class="name">07 <span>Human Time Ago</span></h2>

<
div class="boxparam">
<
class="boxinner"><strong>Only put this code to anywhere of php file</strong></p>
<
div class="boxinnerparam">
 <
code>
php_human_time_ago("time");

//You can use this with mysql database. Please remember its working with "time()" function. When you insert to database use NOW() or time() function.
 
</code
<
br> <br>
  <
img src="images/sample_07.gif" /> 
 </
div>
</
div>


</
div>

  <
div id="08">
  <
h2 class="name">08 <span>CSS3 Animated Links</span></h2>

<
div class="boxparam">
<
class="boxinner"><strong>Only put this code to anywhere of php file</strong></p>
<
div class="boxinnerparam">
 <
code>
php_a_button("Link Name","link url","Font Awsome Class","1 to 16 for color","1 to 4 button","target");
 </
code
<
br> <br>
  <
img src="images/sample_09.gif" /> 
 </
div>
</
div>


</
div>

  <
div id="09">
  <
h2 class="name">09 <span>Contact Form</span></h2>

<
div class="boxparam">
<
class="boxinner"><strong>Only put this code to anywhere of php file</strong></p>
<
div class="boxinnerparam">
 <
code>
php_contact("Form Title","yourmail@yourserver.com","YourName","mail.yourserver.com","server username","server password");
 </
code
<
br> <br>
  <
img src="images/sample_11.gif" /> 
 </
div>
</
div>


</
div>

  <
div id="10">
  <
h2 class="name">10 <span>Facebook Like Box</span></h2>

<
div class="boxparam">
<
class="boxinner"><strong>Only put this code to anywhere of php file</strong></p>
<
div class="boxinnerparam">
 <
code>
php_fb_likebox("Your Facebook Fanpage Link""Width");
 </
code
<
br> <br>
  <
img src="images/sample_13.gif" /> 
 </
div>
</
div>


</
div>

  <
div id="11">
  <
h2 class="name">11 <span>MySQL Insert</span></h2>

<
div class="boxparam">
<
class="boxinner"><strong>Only put this code to anywhere of php file</strong></p>
<
div class="boxinnerparam"

  <
img src="images/sample_14.gif" /> 
 </
div>
</
div>


</
div>

  <
div id="12">
  <
h2 class="name">12 <span>Google QR Code</span></h2>

<
div class="boxparam">
<
class="boxinner"><strong>Only put this code to anywhere of php file</strong></p>
<
div class="boxinnerparam">
 <
code>
 
php_qr_code("Width""Your Website Link"); 
 </
code
<
br> <br>
  <
img src="images/sample_15.gif" /> 
 </
div>
</
div>


</
div>

  <
div id="13">
  <
h2 class="name">13 <span>Check File Extension</span></h2>

<
div class="boxparam">
<
class="boxinner"><strong>Only put this code to anywhere of php file</strong></p>
<
div class="boxinnerparam">
 <
code>
php_getExtension("instagram.jpg"); // This is JPG file...
 
</code
<
br> <br>
  <
img src="images/sample_16.gif" /> 
 </
div>
</
div>


</
div>

  <
div id="14">
  <
h2 class="name">14 <span>Make Clickable</span></h2>

<
div class="boxparam">
<
class="boxinner"><strong>Only put this code to anywhere of php file</strong></p>
<
div class="boxinnerparam">
 <
code>
php_make_clickable($text); //$text from your database 
 
</code
<
br> <br>
  <
img src="images/sample_18.gif" /> 
 </
div>
</
div>


</
div>

  <
div id="15">
  <
h2 class="name">15 <span>Login Authentication</span></h2>

<
div class="boxparam">
<
class="boxinner"><strong>Put this header of page after included ishort-functions.php</strong></p>
<
div class="boxinnerparam">
 <
code>
php_require_auth("username","password");
 </
code
<
br> <br>
  <
img src="images/sample_20.gif" /> 
 </
div>
</
div>


</
div>

  <
div id="16">
  <
h2 class="name">16 <span>Get Site Source Code</span></h2>

<
div class="boxparam">
<
class="boxinner"><strong>Only put this code to anywhere of php file</strong></p>
<
div class="boxinnerparam">
 <
code>
php_view_source("url for source code"); 
 </
code
<
br> <br>
  <
img src="images/sample_21.gif" /> 
 </
div>
</
div>


</
div>

  <
div id="17">
  <
h2 class="name">17 <span>Cleans Text</span></h2>

<
div class="boxparam">
<
class="boxinner"><strong>Only put this code to anywhere of php file</strong></p>
<
div class="boxinnerparam">
 <
code>
cleanScript($html); //$html get text from database content
 
</code
<
br> <br>
  <
img src="images/sample_22.gif" /> 
 </
div>
</
div>


</
div>

  <
div id="18">
  <
h2 class="name">18 <span>Checking Images</span></h2>

<
div class="boxparam">
<
class="boxinner"><strong>Only put this code to anywhere of php file</strong></p>
<
div class="boxinnerparam">
 <
code>
isImage("image path");
 </
code
<
br> <br>
  <
img src="images/sample_23.gif" /> 
 </
div>
</
div>


</
div>

  <
div id="19">
  <
h2 class="name">19 <span>Redirecting url</span></h2>

<
div class="boxparam">
<
class="boxinner"><strong>Only put this code to anywhere of php file</strong></p>
<
div class="boxinnerparam">
 <
code>
php_redirect("url for redirect"); 
 </
code
<
br> <br>
  <
img src="images/sample_233.gif" /> 
 </
div>
</
div>


</
div>

  <
div id="20">
  <
h2 class="name">20 <span>Listing files</span></h2>

<
div class="boxparam">
<
class="boxinner"><strong>Only put this code to anywhere of php file</strong></p>
<
div class="boxinnerparam">
 <
code>
 
list_files("folderpath");
 </
code
<
br> <br>
  <
img src="images/sample_24.gif" /> 
 </
div>
</
div>


</
div>

  <
div id="21">
  <
h2 class="name">21 <span>Random Password</span></h2>

<
div class="boxparam">
<
class="boxinner"><strong>Only put this code to anywhere of php file</strong></p>
<
div class="boxinnerparam">
 <
code>
 
php_rand_pwd("numAlpha","numNonAlpha");
 </
code
<
br> <br>
  <
img src="images/sample_26.gif" /> 
 </
div>
</
div>


</
div>

  <
div id="22">
  <
h2 class="name">22 <span>Shortens URL</span></h2>

<
div class="boxparam">
<
class="boxinner"><strong>Only put this code to anywhere of php file</strong></p>
<
div class="boxinnerparam">
 <
code>
php_google_short("your any url");
 </
code
<
br> <br>
  <
img src="images/sample_28.gif" /> 
 </
div>
</
div>


</
div>

  <
div id="23">
  <
h2 class="name">23 <span>Truncates Text</span></h2>

<
div class="boxparam">
<
class="boxinner"><strong>You should use ECHO with this </strong></p>
<
div class="boxinnerparam">
 <
code>
echo 
php_truncate_end($text);
 </
code
<
br> <br>
  <
img src="images/sample_30.gif" /> 
 </
div>
</
div>


</
div>

  <
div id="24">
  <
h2 class="name">24 <span>Connect Database</span></h2>

<
div class="boxparam">
<
class="boxinner"><strong>Only put this code to anywhere of php file</strong></p>
<
div class="boxinnerparam">
 <
code>
$mysqli php_connect_db('localhost','user','password','database');
 </
code
<
br> <br>
  <
img src="images/sample_31.jpg" /> 
 </
div>
</
div>


</
div>
  <
div id="25">
  <
h2 class="name">25 <span>Make Thumb Image</span></h2>

<
div class="boxparam">
<
class="boxinner"><strong>Only put this code to anywhere of php file</strong></p>
<
div class="boxinnerparam">
 <
code>
ap_php_mkthumb('image/path','weight');
 </
code
 </
div>
</
div>


</
div>
  <
div id="26">
  <
h2 class="name">26 <span>Clean Turkish Characters</span></h2>

<
div class="boxparam">
<
class="boxinner"><strong>This code for sef url</strong></p>
<
div class="boxinnerparam">
 <
code>
cleanTR("ŞşİĞğüÜçÇöÖ");

//output : ssigguuccoo
 
</code
 </
div>
</
div>


</
div>


<
div id="27"
<
h2 class="name">All Done!<span></span></h2>
<
p>Please note that you have to be logged in to see that contact form on my profile pageYou can follow me on CodeCanyon by clicking <a href="http://codecanyon.net/user/altunoren/follow" target="_blank">here</a>.</p>


        <
class="append-bottom alt large"><strong>Have fun! <br>Regardsİsmail Altunören</strong></p>
        <
p><a href="#top">Go To Table of Contents</a></p>
        
</
div><!--  End of content container -->

</
div><!--  End of content -->

</
div><!--  End of main container -->
</
body>
</
html>
?>
Онлайн: 3
Реклама