Posts tagged ‘PHP’

January 27th, 2012

PHP Array Flip – Array Value Key Flip

PHP example that you can use to flip the values and keys in an array. Essentially all the values will become keys and all the keys will become values.

<php

$sampleArray = array(0=>”one”, 1=>”two”, 2=>”three”);

$flipedArray = array_flip($sampleArray);

endphp>

August 9th, 2010

Simple PHP get URI or Segment element

This script takes any uri or segment from the url of the current page and assigns it to a $uri variable. It is very easy to implement so enjoy.

php 

$uri = $_SERVER['REQUEST_URI'];
$pieces = explode("/", $uri);
$uri_3 = $pieces[3];

/php

Refferenses:

URI -Term used to collectively refer to URLs, URNs, and URCs.
lcweb2.loc.gov/ammem/techdocs/repository/gengloss.html

$_SERVER is an array containing information such as headers, paths, and script locations. http://php.net/manual/en/reserved.variables.server.php

explode() Returns an array of strings, each of which is a substring of string formed by splitting it on boundaries formed by the string delimiter. http://php.net/manual/en/function.explode.php

Tags:
July 23rd, 2010

SugarCRM SOAP Methods List

Method Name: login
Binding: sugarsoapBinding
Endpoint: http://10.0.2.113/sugarcrm/service/v2/soap.php
SoapAction: http://sugar/sugarcrm/service/v2/soap.php/login
Style: rpc
Input:
use: encoded
namespace: http://www.sugarcrm.com/sugarcrm
encodingStyle: http://schemas.xmlsoap.org/soap/encoding/
message: loginRequest
parts:
user_auth: tns:user_auth
application_name: xsd:string
name_value_list: tns:name_value_list
Output:
use: encoded
namespace: http://www.sugarcrm.com/sugarcrm
encodingStyle: http://schemas.xmlsoap.org/soap/encoding/
message: loginResponse
parts:
return: tns:entry_value
Namespace: http://www.sugarcrm.com/sugarcrm
Transport: http://schemas.xmlsoap.org/soap/http

Method Name: logout
Binding: sugarsoapBinding
Endpoint: http://10.0.2.113/sugarcrm/service/v2/soap.php
SoapAction: http://sugar/sugarcrm/service/v2/soap.php/logout
Style: rpc
Input:
use: encoded
namespace: http://www.sugarcrm.com/sugarcrm
encodingStyle: http://schemas.xmlsoap.org/soap/encoding/
message: logoutRequest
parts:
session: xsd:string
Output:
use: encoded
namespace: http://www.sugarcrm.com/sugarcrm
encodingStyle: http://schemas.xmlsoap.org/soap/encoding/
message: logoutResponse
parts:
Namespace: http://www.sugarcrm.com/sugarcrm
Transport: http://schemas.xmlsoap.org/soap/http

Method Name: get_entry
Binding: sugarsoapBinding
Endpoint: http://10.0.2.113/sugarcrm/service/v2/soap.php
SoapAction: http://sugar/sugarcrm/service/v2/soap.php/get_entry
Style: rpc
Input:
use: encoded
namespace: http://www.sugarcrm.com/sugarcrm
encodingStyle: http://schemas.xmlsoap.org/soap/encoding/
message: get_entryRequest
parts:
session: xsd:string
module_name: xsd:string
id: xsd:string
select_fields: tns:select_fields
link_name_to_fields_array: tns:link_names_to_fields_array
Output:
use: encoded
namespace: http://www.sugarcrm.com/sugarcrm
encodingStyle: http://schemas.xmlsoap.org/soap/encoding/
message: get_entryResponse
parts:
return: tns:get_entry_result_version2
Namespace: http://www.sugarcrm.com/sugarcrm
Transport: http://schemas.xmlsoap.org/soap/http

Method Name: get_entries
Binding: sugarsoapBinding
Endpoint: http://10.0.2.113/sugarcrm/service/v2/soap.php
SoapAction: http://sugar/sugarcrm/service/v2/soap.php/get_entries
Style: rpc
Input:
use: encoded
namespace: http://www.sugarcrm.com/sugarcrm
encodingStyle: http://schemas.xmlsoap.org/soap/encoding/
message: get_entriesRequest
parts:
session: xsd:string
module_name: xsd:string
ids: tns:select_fields
select_fields: tns:select_fields
link_name_to_fields_array: tns:link_names_to_fields_array
Output:
use: encoded
namespace: http://www.sugarcrm.com/sugarcrm
encodingStyle: http://schemas.xmlsoap.org/soap/encoding/
message: get_entriesResponse
parts:
return: tns:get_entry_result_version2
Namespace: http://www.sugarcrm.com/sugarcrm
Transport: http://schemas.xmlsoap.org/soap/http

Method Name: get_entry_list
Binding: sugarsoapBinding
Endpoint: http://10.0.2.113/sugarcrm/service/v2/soap.php
SoapAction: http://sugar/sugarcrm/service/v2/soap.php/get_entry_list
Style: rpc
Input:
use: encoded
namespace: http://www.sugarcrm.com/sugarcrm
encodingStyle: http://schemas.xmlsoap.org/soap/encoding/
message: get_entry_listRequest
parts:
session: xsd:string
module_name: xsd:string
query: xsd:string
order_by: xsd:string
offset: xsd:int
select_fields: tns:select_fields
link_name_to_fields_array: tns:link_names_to_fields_array
max_results: xsd:int
deleted: xsd:int
Output:
use: encoded
namespace: http://www.sugarcrm.com/sugarcrm
encodingStyle: http://schemas.xmlsoap.org/soap/encoding/
message: get_entry_listResponse
parts:
return: tns:get_entry_list_result_version2
Namespace: http://www.sugarcrm.com/sugarcrm
Transport: http://schemas.xmlsoap.org/soap/http

Method Name: set_relationship
Binding: sugarsoapBinding
Endpoint: http://10.0.2.113/sugarcrm/service/v2/soap.php
SoapAction: http://sugar/sugarcrm/service/v2/soap.php/set_relationship
Style: rpc
Input:
use: encoded
namespace: http://www.sugarcrm.com/sugarcrm
encodingStyle: http://schemas.xmlsoap.org/soap/encoding/
message: set_relationshipRequest
parts:
session: xsd:string
module_name: xsd:string
module_id: xsd:string
link_field_name: xsd:string
related_ids: tns:select_fields
name_value_list: tns:name_value_list
delete: xsd:int
Output:
use: encoded
namespace: http://www.sugarcrm.com/sugarcrm
encodingStyle: http://schemas.xmlsoap.org/soap/encoding/
message: set_relationshipResponse
parts:
return: tns:new_set_relationship_list_result
Namespace: http://www.sugarcrm.com/sugarcrm
Transport: http://schemas.xmlsoap.org/soap/http

Method Name: set_relationships
Binding: sugarsoapBinding
Endpoint: http://10.0.2.113/sugarcrm/service/v2/soap.php
SoapAction: http://sugar/sugarcrm/service/v2/soap.php/set_relationships
Style: rpc
Input:
use: encoded
namespace: http://www.sugarcrm.com/sugarcrm
encodingStyle: http://schemas.xmlsoap.org/soap/encoding/
message: set_relationshipsRequest
parts:
session: xsd:string
module_names: tns:select_fields
module_ids: tns:select_fields
link_field_names: tns:select_fields
related_ids: tns:new_set_relationhip_ids
name_value_lists: tns:name_value_lists
delete_array: tns:deleted_array
Output:
use: encoded
namespace: http://www.sugarcrm.com/sugarcrm
encodingStyle: http://schemas.xmlsoap.org/soap/encoding/
message: set_relationshipsResponse
parts:
return: tns:new_set_relationship_list_result
Namespace: http://www.sugarcrm.com/sugarcrm
Transport: http://schemas.xmlsoap.org/soap/http

Method Name: get_relationships
Binding: sugarsoapBinding
Endpoint: http://10.0.2.113/sugarcrm/service/v2/soap.php
SoapAction: http://sugar/sugarcrm/service/v2/soap.php/get_relationships
Style: rpc
Input:
use: encoded
namespace: http://www.sugarcrm.com/sugarcrm
encodingStyle: http://schemas.xmlsoap.org/soap/encoding/
message: get_relationshipsRequest
parts:
session: xsd:string
module_name: xsd:string
module_id: xsd:string
link_field_name: xsd:string
related_module_query: xsd:string
related_fields: tns:select_fields
related_module_link_name_to_fields_array: tns:link_names_to_fields_array
deleted: xsd:int
Output:
use: encoded
namespace: http://www.sugarcrm.com/sugarcrm
encodingStyle: http://schemas.xmlsoap.org/soap/encoding/
message: get_relationshipsResponse
parts:
return: tns:get_entry_result_version2
Namespace: http://www.sugarcrm.com/sugarcrm
Transport: http://schemas.xmlsoap.org/soap/http

Method Name: set_entry
Binding: sugarsoapBinding
Endpoint: http://10.0.2.113/sugarcrm/service/v2/soap.php
SoapAction: http://sugar/sugarcrm/service/v2/soap.php/set_entry
Style: rpc
Input:
use: encoded
namespace: http://www.sugarcrm.com/sugarcrm
encodingStyle: http://schemas.xmlsoap.org/soap/encoding/
message: set_entryRequest
parts:
session: xsd:string
module_name: xsd:string
name_value_list: tns:name_value_list
Output:
use: encoded
namespace: http://www.sugarcrm.com/sugarcrm
encodingStyle: http://schemas.xmlsoap.org/soap/encoding/
message: set_entryResponse
parts:
return: tns:new_set_entry_result
Namespace: http://www.sugarcrm.com/sugarcrm
Transport: http://schemas.xmlsoap.org/soap/http

Method Name: set_entries
Binding: sugarsoapBinding
Endpoint: http://10.0.2.113/sugarcrm/service/v2/soap.php
SoapAction: http://sugar/sugarcrm/service/v2/soap.php/set_entries
Style: rpc
Input:
use: encoded
namespace: http://www.sugarcrm.com/sugarcrm
encodingStyle: http://schemas.xmlsoap.org/soap/encoding/
message: set_entriesRequest
parts:
session: xsd:string
module_name: xsd:string
name_value_lists: tns:name_value_lists
Output:
use: encoded
namespace: http://www.sugarcrm.com/sugarcrm
encodingStyle: http://schemas.xmlsoap.org/soap/encoding/
message: set_entriesResponse
parts:
return: tns:new_set_entries_result
Namespace: http://www.sugarcrm.com/sugarcrm
Transport: http://schemas.xmlsoap.org/soap/http

Method Name: get_server_info
Binding: sugarsoapBinding
Endpoint: http://10.0.2.113/sugarcrm/service/v2/soap.php
SoapAction: http://sugar/sugarcrm/service/v2/soap.php/get_server_info
Style: rpc
Input:
use: encoded
namespace: http://www.sugarcrm.com/sugarcrm
encodingStyle: http://schemas.xmlsoap.org/soap/encoding/
message: get_server_infoRequest
parts:
Output:
use: encoded
namespace: http://www.sugarcrm.com/sugarcrm
encodingStyle: http://schemas.xmlsoap.org/soap/encoding/
message: get_server_infoResponse
parts:
return: tns:get_server_info_result
Namespace: http://www.sugarcrm.com/sugarcrm
Transport: http://schemas.xmlsoap.org/soap/http


Method Name: get_user_id

Binding: sugarsoapBinding
Endpoint: http://10.0.2.113/sugarcrm/service/v2/soap.php
SoapAction: http://sugar/sugarcrm/service/v2/soap.php/get_user_id
Style: rpc
Input:
use: encoded
namespace: http://www.sugarcrm.com/sugarcrm
encodingStyle: http://schemas.xmlsoap.org/soap/encoding/
message: get_user_idRequest
parts:
session: xsd:string
Output:
use: encoded
namespace: http://www.sugarcrm.com/sugarcrm
encodingStyle: http://schemas.xmlsoap.org/soap/encoding/
message: get_user_idResponse
parts:
return: xsd:string
Namespace: http://www.sugarcrm.com/sugarcrm
Transport: http://schemas.xmlsoap.org/soap/http

Method Name: get_module_fields
Binding: sugarsoapBinding
Endpoint: http://10.0.2.113/sugarcrm/service/v2/soap.php
SoapAction: http://sugar/sugarcrm/service/v2/soap.php/get_module_fields
Style: rpc
Input:
use: encoded
namespace: http://www.sugarcrm.com/sugarcrm
encodingStyle: http://schemas.xmlsoap.org/soap/encoding/
message: get_module_fieldsRequest
parts:
session: xsd:string
module_name: xsd:string
fields: tns:select_fields
Output:
use: encoded
namespace: http://www.sugarcrm.com/sugarcrm
encodingStyle: http://schemas.xmlsoap.org/soap/encoding/
message: get_module_fieldsResponse
parts:
return: tns:new_module_fields
Namespace: http://www.sugarcrm.com/sugarcrm
Transport: http://schemas.xmlsoap.org/soap/http

Method Name: seamless_login
Binding: sugarsoapBinding
Endpoint: http://10.0.2.113/sugarcrm/service/v2/soap.php
SoapAction: http://sugar/sugarcrm/service/v2/soap.php/seamless_login
Style: rpc
Input:
use: encoded
namespace: http://www.sugarcrm.com/sugarcrm
encodingStyle: http://schemas.xmlsoap.org/soap/encoding/
message: seamless_loginRequest
parts:
session: xsd:string
Output:
use: encoded
namespace: http://www.sugarcrm.com/sugarcrm
encodingStyle: http://schemas.xmlsoap.org/soap/encoding/
message: seamless_loginResponse
parts:
return: xsd:int
Namespace: http://www.sugarcrm.com/sugarcrm
Transport: http://schemas.xmlsoap.org/soap/http

Method Name: set_note_attachment
Binding: sugarsoapBinding
Endpoint: http://10.0.2.113/sugarcrm/service/v2/soap.php
SoapAction: http://sugar/sugarcrm/service/v2/soap.php/set_note_attachment
Style: rpc
Input:
use: encoded
namespace: http://www.sugarcrm.com/sugarcrm
encodingStyle: http://schemas.xmlsoap.org/soap/encoding/
message: set_note_attachmentRequest
parts:
session: xsd:string
note: tns:new_note_attachment
Output:
use: encoded
namespace: http://www.sugarcrm.com/sugarcrm
encodingStyle: http://schemas.xmlsoap.org/soap/encoding/
message: set_note_attachmentResponse
parts:
return: tns:new_set_entry_result
Namespace: http://www.sugarcrm.com/sugarcrm
Transport: http://schemas.xmlsoap.org/soap/http


Method Name: get_note_attachment

Binding: sugarsoapBinding
Endpoint: http://10.0.2.113/sugarcrm/service/v2/soap.php
SoapAction: http://sugar/sugarcrm/service/v2/soap.php/get_note_attachment
Style: rpc
Input:
use: encoded
namespace: http://www.sugarcrm.com/sugarcrm
encodingStyle: http://schemas.xmlsoap.org/soap/encoding/
message: get_note_attachmentRequest
parts:
session: xsd:string
id: xsd:string
Output:
use: encoded
namespace: http://www.sugarcrm.com/sugarcrm
encodingStyle: http://schemas.xmlsoap.org/soap/encoding/
message: get_note_attachmentResponse
parts:
return: tns:new_return_note_attachment
Namespace: http://www.sugarcrm.com/sugarcrm
Transport: http://schemas.xmlsoap.org/soap/http

Method Name: set_document_revision
Binding: sugarsoapBinding
Endpoint: http://10.0.2.113/sugarcrm/service/v2/soap.php
SoapAction: http://sugar/sugarcrm/service/v2/soap.php/set_document_revision
Style: rpc
Input:
use: encoded
namespace: http://www.sugarcrm.com/sugarcrm
encodingStyle: http://schemas.xmlsoap.org/soap/encoding/
message: set_document_revisionRequest
parts:
session: xsd:string
note: tns:document_revision
Output:
use: encoded
namespace: http://www.sugarcrm.com/sugarcrm
encodingStyle: http://schemas.xmlsoap.org/soap/encoding/
message: set_document_revisionResponse
parts:
return: tns:new_set_entry_result
Namespace: http://www.sugarcrm.com/sugarcrm
Transport: http://schemas.xmlsoap.org/soap/http

Method Name: get_document_revision
Binding: sugarsoapBinding
Endpoint: http://10.0.2.113/sugarcrm/service/v2/soap.php
SoapAction: http://sugar/sugarcrm/service/v2/soap.php/get_document_revision
Style: rpc
Input:
use: encoded
namespace: http://www.sugarcrm.com/sugarcrm
encodingStyle: http://schemas.xmlsoap.org/soap/encoding/
message: get_document_revisionRequest
parts:
session: xsd:string
i: xsd:string
Output:
use: encoded
namespace: http://www.sugarcrm.com/sugarcrm
encodingStyle: http://schemas.xmlsoap.org/soap/encoding/
message: get_document_revisionResponse
parts:
return: tns:new_return_document_revision
Namespace: http://www.sugarcrm.com/sugarcrm
Transport: http://schemas.xmlsoap.org/soap/http

Method Name: search_by_module
Binding: sugarsoapBinding
Endpoint: http://10.0.2.113/sugarcrm/service/v2/soap.php
SoapAction: http://sugar/sugarcrm/service/v2/soap.php/search_by_module
Style: rpc
Input:
use: encoded
namespace: http://www.sugarcrm.com/sugarcrm
encodingStyle: http://schemas.xmlsoap.org/soap/encoding/
message: search_by_moduleRequest
parts:
session: xsd:string
search_string: xsd:string
modules: tns:select_fields
offset: xsd:int
max_results: xsd:int
Output:
use: encoded
namespace: http://www.sugarcrm.com/sugarcrm
encodingStyle: http://schemas.xmlsoap.org/soap/encoding/
message: search_by_moduleResponse
parts:
return: tns:return_search_result
Namespace: http://www.sugarcrm.com/sugarcrm
Transport: http://schemas.xmlsoap.org/soap/http


Method Name: get_available_modules

Binding: sugarsoapBinding
Endpoint: http://10.0.2.113/sugarcrm/service/v2/soap.php
SoapAction: http://sugar/sugarcrm/service/v2/soap.php/get_available_modules
Style: rpc
Input:
use: encoded
namespace: http://www.sugarcrm.com/sugarcrm
encodingStyle: http://schemas.xmlsoap.org/soap/encoding/
message: get_available_modulesRequest
parts:
session: xsd:string
Output:
use: encoded
namespace: http://www.sugarcrm.com/sugarcrm
encodingStyle: http://schemas.xmlsoap.org/soap/encoding/
message: get_available_modulesResponse
parts:
return: tns:module_list
Namespace: http://www.sugarcrm.com/sugarcrm
Transport: http://schemas.xmlsoap.org/soap/http

Method Name: get_user_team_id
Binding: sugarsoapBinding
Endpoint: http://10.0.2.113/sugarcrm/service/v2/soap.php
SoapAction: http://sugar/sugarcrm/service/v2/soap.php/get_user_team_id
Style: rpc
Input:
use: encoded
namespace: http://www.sugarcrm.com/sugarcrm
encodingStyle: http://schemas.xmlsoap.org/soap/encoding/
message: get_user_team_idRequest
parts:
session: xsd:string
Output:
use: encoded
namespace: http://www.sugarcrm.com/sugarcrm
encodingStyle: http://schemas.xmlsoap.org/soap/encoding/
message: get_user_team_idResponse
parts:
return: xsd:string
Namespace: http://www.sugarcrm.com/sugarcrm
Transport: http://schemas.xmlsoap.org/soap/http

Method Name: set_campaign_merge
Binding: sugarsoapBinding
Endpoint: http://10.0.2.113/sugarcrm/service/v2/soap.php
SoapAction: http://sugar/sugarcrm/service/v2/soap.php/set_campaign_merge
Style: rpc
Input:
use: encoded
namespace: http://www.sugarcrm.com/sugarcrm
encodingStyle: http://schemas.xmlsoap.org/soap/encoding/
message: set_campaign_mergeRequest
parts:
session: xsd:string
targets: tns:select_fields
campaign_id: xsd:string
Output:
use: encoded
namespace: http://www.sugarcrm.com/sugarcrm
encodingStyle: http://schemas.xmlsoap.org/soap/encoding/
message: set_campaign_mergeResponse
parts:
Namespace: http://www.sugarcrm.com/sugarcrm
Transport: http://schemas.xmlsoap.org/soap/http

June 28th, 2010

jQuery Tools Form + PHP mail() (PHP 4, PHP 5)

jquery php email form

jquery php email form

This example shows how to integrate php mail which is is used to send emails from inside a script with jQuery Tools form which is a collection of essential form building tools. Validation, range- and date inputs for humans. Those two make a great combination and are easy to implement to any website. Here is the example. The code speaks for itself so there is not much commenting on it.

Standalone example can be found HERE.
Source code HERE.

PHP:


if(isset($_POST['submit'])){
  $to      = $_POST['email'];
  $subject = "You've got mail";
  $message = "*** eMail: ".$_POST['email']."*** Website: ".$_POST['url']."*** Name: ".$_POST['name']."*** Age; ".$_POST['age'];
  $headers = 'From: webmaster@example.com' . "\r\n" .
      'Reply-To: webmaster@example.com' . "\r\n" .
      'X-Mailer: PHP/' . phpversion();

  mail($to, $subject, $message, $headers);
  
  echo "Email to ".$_POST['email']." was sent successfuly! <br />";
}

HTML:


<form id="myform" method="post">

   <fieldset>
      <h3>PHP + JQuery Tools Sample email form</h3>
      
      <p> Enter bad values and then press the email button. </p>
      
      <p>
         <label>email *</label>
         <input type="email" name="email" required="required" />
      </p>
      <p>
         <label>website *</label>
         <input type="url" name="url" required="required" />
      </p>
      <p>
         <label>name *</label>
         <input type="text" name="name" pattern="[a-zA-Z ]{5,}" maxlength="30" />
      </p>
      <p>
         <label>age</label>
         <input type="number" name="age" size="4" min="5" max="50" />
      </p>
      <input type='hidden' name='submit' />
      
      <button type="submit">Email form</button>
      <button type="reset">Reset</button>
   </fieldset>

</form>


<script>
$("#myform").validator();
</script>

February 23rd, 2010

TOP PHP MYSQL SELECT QUERIES EXAMPLES

The SELECT query plays a very

important role when working

with PHP and MYSQL. SELECT

is used when you are trying to

retrieve data from the database.

In this blog I am providing four

examples of how to retrieve that

data in the most efficient and quick

way. If you are planning on using

MYSQL with PHP extension I would

recommend that you become familier

with those examples.

1) The following query retrieves data from one field of the specified row found

in the result set:


$query  = “SELECT itemid, name FROM item ORDER BY name”;

$result_query = mysql_query($query);

$itemid = mysql_result($result_query, 0, “itemid”);

$name = mysql_result($result_query, 0 , “name”);

2) The following query retrieves an entire row of data from result set, placing

the values in an indexed array:


$query  = “SELECT itemid, name FROM item ORDER BY name”;

$result_query = mysql_query($query);

while (list($itemid, $name) = mysql_fetch_row($result_query))

{

Echo “Item: $name ($itemid) &lt;br /&gt;”;

}

3) The following query retrieves results solely by numerical indeces:


$query  = “SELECT itemid, name FROM item ORDER BY name”;

$result_query = mysql_query($query);

while ($row = mysql_fetch_array($result_query, MYSQL_NUM))

{

$name = $row[1];

$itemid = $row[0];

Echo “Item:  $name ($itemid) &lt;br /&gt;”;

}

4) The following query is almost the same as the previews but uses objects

instead of array:


$query  = “SELECT itemid, name FROM item ORDER BY name”;

$result_query = mysql_query($query);

while ($row  = mysql_fetch_object($result_query))

{

$name = $row -&gt; name;

$itemid = $row -&gt; itemid;

Echo “Item:  $name ($itemid) &lt;br /&gt;”;

}

February 18th, 2010

GoDaddy .htaccess PHP RewriteRule RewriteEngine Rewrite rules For SEO URLS

This is a very common issue that

people run into when they decide to

switch to the GoDaddy’s amazingly

cheap hosting. I struggled with the

RewriteEngine after switching to GoDaddy

and finally came up with a simple fix. For

all of you that want to use the rewrite rules

in the .htaccess file for SEO purposes here is

the simple solution I came up with. By

default if you have a rewrite rule that has

the same name as the php file you will run

into trouble. The following example takes care of it.


########## Begin - Rewrite rules For SEO urls ##
#
Options -MultiViews
Options +FollowSymlinks

RewriteEngine on
#
#
#
#URL Rewriting for Videos
RewriteRule ^videos videos.php [nc]
########## End – Rewrite rules For SEO urls ##

December 18th, 2009

PHP Copyright Date Script

This is one of the most basic scripts you can

ever create with PHP but also extreemly

useful for web site copyright notices. It

doesn’t take any effort to replace your

current static year with the following

script.

DEMO

© <?php echo date("Y"); ?> – eRunways

December 14th, 2009

PHP Form Copy Files Between Folders

PHP Form Copy Files Between Folders

PHP Form Copy Files Between Folders

This form is used to copy all the files from one

dir to seperate folders with x amount of files

each.  It gives you the option to choose

directory with the files, the path to the dir

where the files are going to (MAKE SURE

THIS EXISTS AND IS CHMOD 777,

the max number of pics or other files,

prefix, and file types to be

copied.

DEMO

GET PHP SOURCE CODE

GET HTML SOURCE CODE

December 4th, 2009

WWW.WAREZ-BB.ORG PHP SQL CRITICAL ERROR

Critical Error!
message_die() was called multiple times.


Error #1
Could not obtain topic information

Line : 212
File : /home/admin/domains/warez-bb.org/public_html/viewtopic.php
SQL : SELECT t.topic_id, t.topic_title, t.topic_status, t.topic_replies, t.topic_time, t.topic_type, t.topic_vote, t.topic_last_post_id, t.title_compl_infos, t.topic_last_post_time, t.topic_censor_serial, t.topic_censor_ids, t.topic_poster, t.topic_first_post_id, f.forum_name, f.forum_status, f.forum_id, f.auth_view, f.auth_read, f.auth_post, f.auth_reply, f.auth_edit, f.auth_delete, f.auth_sticky, f.auth_announce, f.auth_pollcreate, f.auth_vote, f.auth_attachments, f.auth_ban, f.auth_greencard, f.attached_forum_id, f.forum_password FROM driaw_topics t, driaw_forums f WHERE t.topic_id = 3623540 AND f.forum_id = t.forum_id


Error #2
Error doing DB query userdata row fetch

Line : 90
File : /home/admin/domains/warez-bb.org/public_html/includes/sessions.php
SQL : SELECT u.* FROM driaw_users u, driaw_sessions_keys k WHERE u.user_id = 78957 AND u.user_active = 1 AND k.user_id = u.user_id AND k.key_id = ‘f6eb3d123da7046c45a002c7448c3456′

November 21st, 2009

PHP + JavaScript System Info >> Simple script to provide information about the site visitor

This is a simple script that provides information about the site visitor.
* What version of JavaScript the vistor browser supports
* Visitor IP Address
* Visitor Hostmask
DEMO at erunways.com/ip

PHP JAVASCRIPT SYSTEM INFO

PHP JAVASCRIPT SYSTEM INFO