<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Всякие интересные штучки для WEB-разработчика</title>
	<atom:link href="http://iphp.com.ua/feed" rel="self" type="application/rss+xml" />
	<link>http://iphp.com.ua</link>
	<description>блог о технологиях web-разработки</description>
	<lastBuildDate>Sat, 06 Mar 2010 22:19:17 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>10 бесплатных Primary и Seconadary DNS серверов</title>
		<link>http://iphp.com.ua/archives/516</link>
		<comments>http://iphp.com.ua/archives/516#comments</comments>
		<pubDate>Sat, 06 Mar 2010 22:18:21 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://iphp.com.ua/?p=516</guid>
		<description><![CDATA[DNS (англ. Domain Name System — система доменных имён) — распределённая система преобразования имени хоста (компьютера или другого сетевого устройства) в IP адрес. DNS работает в сетях TCP/IP. Как частный случай, DNS может хранить и обрабатывать и обратные запросы, определения имени хоста по его IP. wikipedia.org
Поскольку за обслуживание ваших доменных зон соответствующие сервисы просят порядка 10-15 [...]]]></description>
			<content:encoded><![CDATA[<blockquote><p>DNS (англ. Domain Name System — система доменных имён) — распределённая система преобразования имени хоста (компьютера или другого сетевого устройства) в IP адрес. DNS работает в сетях TCP/IP. Как частный случай, DNS может хранить и обрабатывать и обратные запросы, определения имени хоста по его IP. <a title="DNS" href="http://ru.wikipedia.org/wiki/DNS">wikipedia.org</a></p></blockquote>
<p>Поскольку за обслуживание ваших доменных зон соответствующие сервисы просят порядка 10-15 $ в год, что конечно не есть много, НО … я поделюсь списком из “10ти Free DNS”, т.е. совершенно бесплатных DNS серверов.</p>
<p><strong>Primary DNS</strong><noindex><br />
<a href="http://zoneedit.com/">http://zoneedit.com/</a><br />
<a href="http://editdns.org/">http://editdns.org/</a><br />
<a href="http://dollardns.net/">http://dollardns.net/</a><br />
<a href="http://xname.org/">http://xname.org/</a><br />
<a href="http://freedns.afraid.org/">http://freedns.afraid.org/</a><br />
<a href="http://primaryns.kiev.ua/">http://primaryns.kiev.ua</a><br />
<a href="http://www.everydns.net/">http://www.everydns.net/</a><br />
<a href="http://www.dyndns.com/">http://www.dyndns.com/</a><br />
<strong>Secondary DNS</strong><br />
<a href="http://secondary.net.ua/">http://secondary.net.ua/</a><br />
<a href="http://ns2.trifle.net/">http://ns2.trifle.net/</a></p>
<p>От себя добавлю, что довольно длительное время использую ZoneEdit и Xname. Проблем с ними не имел, на ZoneEdit имеется ограничение на 5 зонаккаунт Xname же позволяет создать как Primary и Seconadary DNS.</p>
<p>Ну и конечно же<br />
<a href="http://primaryns.kiev.ua">http://primaryns.kiev.ua</a><br />
<a href="http://secondary.net.ua/">http://secondary.net.ua/</a><br />
</noindex></p>
]]></content:encoded>
			<wfw:commentRss>http://iphp.com.ua/archives/516/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Really Useful Classes And Libraries For PHP Developers</title>
		<link>http://iphp.com.ua/archives/514</link>
		<comments>http://iphp.com.ua/archives/514#comments</comments>
		<pubDate>Sat, 27 Feb 2010 00:36:48 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://iphp.com.ua/archives/514</guid>
		<description><![CDATA[Today millions of websites and servers across the Internet are  powered by PHP. Originally created by Rasmus  Lerdorf in 1995 so that anyone can easily create a Personal Home  Page; PHP has come a long way and is now widely used as general purpose  scripting language that is suitable for majority [...]]]></description>
			<content:encoded><![CDATA[<p>Today millions of websites and servers across the Internet are  powered by PHP. Originally created by <a href="http://en.wikipedia.org/wiki/Rasmus_Lerdorf" target="_blank">Rasmus  Lerdorf</a> in 1995 so that anyone can easily create a Personal Home  Page; PHP has come a long way and is now widely used as general purpose  scripting language that is suitable for majority of web development  projects.</p>
<p>Numerous <a href="http://www.phpframeworks.com/" target="_blank">PHP  Frameworks</a> have evolved to enable rapid web development with PHP.  However even greater number of standalone PHP libraries and classes are  available which provide similar benefits. W3Avenue has compiled a list  of some really useful classes and libraries that every PHP developers  should be familiar with. Whether you like to use a PHP Framework or  prefer to work without one, your productivity can multiply with the help  of these libraries and classes.</p>
<p><span id="more-514"></span></p>
<h3>Database</h3>
<ul>
<li><a href="http://adodb.sourceforge.net/" target="_blank"><strong>ADOdb</strong></a><br />
An object oriented library written in PHP that abstracts database  operations for portability. It is modeled on Microsoft’s <strong>ADO</strong>,  but has many improvements that make it unique (eg. <strong>Pivot Tables</strong>,  <strong>Active Record</strong> support, generating HTML for paging  recordsets with next and previous links, cached recordsets, HTML menu  generation, etc). Supports large number of databases including: MySQL,  PostgreSQL, Interbase, Firebird, Informix, Oracle, MS SQL, Foxpro,  Access, ADO, Sybase, FrontBase, DB2, SAP DB, SQLite, Netezza, LDAP, and  generic ODBC, ODBTP.</li>
<li><strong><a href="http://www.redbeanphp.com/" target="_blank">RedBean</a></strong><br />
RedBean is an easy, lightweight ORM for PHP that doesn’t require any  configuration and works out of the box. The only requirement is a  database connection string; it offer a single setup-class that gets you  up and running with just 1 single method invocation.</li>
<li><a href="http://www.doctrine-project.org/" target="_blank"><strong>Doctrine</strong></a><br />
Doctrine is an object relational mapper (<strong>ORM</strong>) for PHP  5.2.3+ that sits on top of a powerful database abstraction layer (DBAL).  One of its key features is the option to write database queries in a  proprietary object oriented SQL dialect called Doctrine Query Language  (DQL), inspired by Hibernates HQL. This provides developers with a  powerful alternative to SQL that maintains flexibility without requiring  unnecessary code duplication.</li>
<li><a href="http://phplinq.codeplex.com/" target="_blank"><strong>PHPLINQ</strong></a><br />
A set of PHP classes mimicing C#3.0’s <strong>LINQ</strong> (Language  Integrated Query) extension methods.PHPLinq currently features: LINQ  operators (select, take, skip, orderBy / orderByDescending, thenBy /  thenByDescending), Lambda expressions, and Anonymous types.</li>
<li><a href="http://mimesis.110mb.com/" target="_blank"><strong>Mimesis</strong></a><br />
Mimesis is an Open Source PHP <strong>Flat File Database</strong> low-level API designed to act as a backend for server-side scripts that  require database functionality. Instead of parsing SQL statements,  Mimesis uses PHP’s object-oriented constructs to provide a distinct  class with various database manipulation methods.</li>
</ul>
<h3>Development</h3>
<ul>
<li><a href="http://matrix.squiz.net/developer/tools/php_cs" target="_blank"><strong>PHP CodeSniffer</strong></a><br />
PHP CodeSniffer is a PHP5 script that tokenizes and “sniffs” PHP code to  detect violations of a defined set of coding standards. It is an  essential development tool that ensures that your code remains clean and  consistent. It can even help prevent some common semantic errors made  by developers.</li>
<li><a href="http://manual.phpdoc.org/" target="_blank"><strong>phpDocumentor</strong></a><br />
Similar to Javadoc, and written in php, phpDocumentor can be used from  the command line or a web interface to create professional <strong>documentation</strong> from php source code. phpDocumentor has support for linking between  documentation, incorporating user level documents like tutorials and  creation of highlighted source code with cross referencing to PHP  general documentation.</li>
</ul>
<h3>Document</h3>
<ul>
<li><a href="http://www.tcpdf.org/" target="_blank"><strong>TCPDF</strong></a><br />
An Open Source PHP class for generating <strong>PDF</strong> documents.  Requires no external libraries for the basic functions; supports all ISO  page formats including UTF-8, Unicode, RTL languages and HTML.</li>
<li><a href="http://www.phppowerpoint.net/" target="_blank"><strong>PHPPowerPoint</strong></a><br />
Based on Microsoft’s OpenXML standard PHPPowerPoint Classes enables you  to read and write <strong>PowerPoint</strong> files. Features include:  setting presentation meta data (author, title, description, …), adding  slides, adding images to your presentation and much more!</li>
<li><a href="http://www.phpexcel.net/" target="_blank"><strong>PHPExcel</strong></a><br />
Based on Microsoft’s OpenXML standard PHPExcel Class enables you to read  and write <strong>Excel</strong> files. Features include:  setting  spreadsheet meta data (author, title, description, …), multiple  worksheets, different fonts and font styles, cell borders, fills,  gradients, adding images to your spreadsheet and much, much more!</li>
<li><a href="http://sourceforge.net/projects/phprtf/" target="_blank"><strong>PhpRtf  Lite</strong></a><br />
Purpose of this library is to create <strong>RTF</strong> documents with  PHP, which are compatible with <strong>Microsoft Word</strong> and <strong>Open  Office Writer</strong> programs. Main features include: Document  sections formatting: margins, paper size, borders and other (document  can have more than one section); Headers and footer formatting;  Paragraph control: background, borders, alignment and other; Font  control: bold, italic, face, size, color (it’s possible to use html  style tags); Embedded images (.jpg and .png formats); Tables formatting:  sizes, borders, background and alignment of cells; UTF-8 support.</li>
<li><a href="http://www.phpconcept.net/pclzip/index.en.php" target="_blank"><strong>PclZip</strong></a><br />
Offers <strong>compression</strong> and <strong>extraction</strong> functions for <strong>Zip</strong> formatted archives (WinZip, PKZIP).  It gives you the ability to create an archive, list the content and  extract all its content in the file system. PclZip defines an object  class which represent a Zip Archive. This class manages the archive  properties and offers access method and actions on the archive.</li>
</ul>
<h3>Email</h3>
<ul>
<li><a href="http://swiftmailer.org/" target="_blank"><strong>Swift  Mailer</strong></a><br />
Swift Mailer integrates into any web app written in PHP 5, offering a  flexible and elegant object-oriented approach to sending emails with a  multitude of features: Send emails using <strong>SMTP</strong>, <strong>Sendmail</strong>,  <strong>Postfix</strong> or a custom Transport implementation of your  own, Support servers that require username &amp; password and/or  encryption, Protect from header injection attacks without stripping  request data content, Send MIME compliant HTML/multipart emails, Use  event-driven plugins to customize the library, Handle large attachments  and inline/embedded images with low memory use.</li>
<li><a href="http://phpmailer.worxware.com/" target="_blank"><strong>PHPMailer</strong></a><br />
Full featured email transfer class for PHP. PHPMailer features: Supports  emails digitally signed with S/MIME encryption, Supports emails with  multiple TOs, CCs, BCCs and REPLY-TOs, Supports Text &amp; HTML emails,  Embedded image support, Multipart/alternative emails for mail clients  that do not read HTML email, Redundant SMTP servers, SMTP  authentication, Tested on multiple <strong>SMTP</strong> servers: <strong>Sendmail</strong>,  qmail, <strong>Postfix</strong>, <strong>Gmail</strong>, Imail,  Exchange, etc.</li>
</ul>
<h3>Form</h3>
<ul>
<li><a href="http://www.phpcaptcha.org/" target="_blank"><strong>Securimage</strong></a><br />
An open-source free PHP <strong>CAPTCHA</strong> script for generating  complex images and CAPTCHA codes to protect forms from spam and abuse.  It can be easily added into existing forms on your website to provide  protection from spam bots.</li>
<li><a href="http://pof.sourceforge.net/" target="_blank"><strong>phpObjectForms</strong></a><br />
phpObjectForms is a fully object-oriented, highly customizable, easily  extendable, library for creating and processing HTML forms without  writing any HTML code. Main Features: Support for all the standard HTML  form input elements, <strong>Server-side input validation</strong> based  on regular expressions, Optional client-side JavaScript pre-validation,  Support for template-based forms. The output forms presentation is  highly tied with CSS, therefore it can be easily tuned without writing  any code but only by changing the style sheet.</li>
</ul>
<h3>HTML / CSS</h3>
<ul>
<li><a href="http://htmlpurifier.org/" target="_blank"><strong>HTML  Purifier</strong></a><br />
HTML Purifier is a standards-compliant <strong>HTML</strong> filter  library written in PHP. HTML Purifier will not only remove all malicious  code (better known as <strong>XSS</strong>) with a thoroughly audited,  secure yet permissive white list, it will also make sure your documents  are standards compliant, something only achievable with a comprehensive  knowledge of W3C’s specifications.</li>
<li><a href="http://qbnz.com/highlighter/" target="_blank"><strong>GeSHi  – Generic Syntax Highlighter</strong></a><br />
GeSHi is a <strong>syntax highlighter</strong> for HTML, written in PHP.  Basically, you input the source you want to highlight and the name of  the language you want to highlight it in, and GeSHi returns the  syntax-highlighted result. But it doesn’t stop there – GeSHi has many  powerful and unique features, including: The ability to change the  styles of any highlighted element on the fly, Use of CSS classes to  reduce the amount of output produced (GeSHi can also produce a  stylesheet to be used with a language on the fly), XHTML 1.0 Strict +  CSS2 compliance, Auto-caps/noncaps of keywords, Line numbering (both  normal and fancy forms, see the demo, and many more!</li>
</ul>
<h3>Image / Media / File</h3>
<ul>
<li><a href="http://asido.info/" target="_blank"><strong>Asido</strong></a><br />
A PHP <strong>image processing</strong> solution, with “pluggable”  drivers(adapters) for virtually any environment: GD2, Magick Wand, Image  Magick via shell, Image Magick via extension, etc. Asido offers the  following functionality: resize images, watermark images, rotate imates,  copy images, crop images, grayscale images, convert images.</li>
<li><a href="http://phpthumb.gxdlabs.com/" target="_blank"><strong>PHP  Thumb</strong></a><br />
A light-weight <strong>image manipulation</strong> library aimed at  thumbnail generation. It features the ability to resize by width,  height, and percentage, create custom crops, or square crops from the  center, and rotate the image. You can also easily add custom  functionality to the library through plugins. It also features the  ability to perform multiple manipulations per instance (also known as  chaining), without the need to save and re-initialize the class with  every manipulation.</li>
<li><a href="http://wideimage.sourceforge.net/" target="_blank"><strong>WideImage</strong></a><br />
WideImage is an object-oriented library for <strong>image manipulation</strong>.  The library focuses on often-used image operations and ease of use. It  provides a simple and unified way to loading and saving images from/to  files, strings, database and even URLs (load only, must be enabled in  PHP). Supports the most common image formats: GIF, PNG, JPEG, GD and  GD2.</li>
<li><a href="http://shiftingpixel.com/2008/03/03/smart-image-resizer/" target="_blank"><strong>Smart Image Resizer</strong></a><br />
Allows you to <strong>resize and crop</strong> any image on your website  without touching the actual image or writing any code. Simply upload  each image once at a high enough resolution and then reuse it at any  size you want, anywhere you want. Features include: Resizes JPEGs, GIFs,  and PNGs, Intelligently sharpens for crisp photos at any size, Can crop  based on width:height ratios, Can color-fill transparent GIFs and PNGs,  Built-in caching keeps image variations for optimal performance.</li>
<li><a href="http://www.verot.net/php_class_upload.htm" target="_blank"><strong>class.upload.php</strong></a><br />
This PHP script <strong>uploads files</strong> and manipulates images  very easily. The perfect script to generate thumbnails or create a photo  gallery! It can convert, resize and work on uploaded images in many  ways, add labels, watermarks and reflections and other image editing  features. You can use it for files uploaded through an HTML form, a  Flash uploader, or on local files.</li>
<li><a href="http://www.getid3.org/" target="_blank"><strong>getID3()</strong></a><br />
A PHP script that extracts useful information (such as ID3 tags,  bitrate, playtime, etc.) from MP3s &amp; other <strong>multimedia file  formats</strong> (Ogg, WMA, WMV, ASF, WAV, AVI, AAC, VQF, FLAC,  MusePack, Real, QuickTime, Monkey’s Audio, MIDI and more).</li>
<li><strong><a href="http://www.kingsquare.nl/php-psd-reader" target="_blank">PHP PSD Reader</a></strong><br />
PHP comes with built-in support to read and write images in many formats  using the GD library. However, it does not support the Photoshop image  format: PSD. This class fill partly that void by reading Photoshop PSD  image files and creating a GD image resource from the Photoshop image  bitmaps.</li>
</ul>
<h3>JavaScript / AJAX</h3>
<ul>
<li><a href="http://www.phplivex.com/" target="_blank"><strong>PHPLiveX</strong></a><br />
PHPLiveX is a lightweight PHP-JavaScript class library that helps you  integrate <strong>AJAX</strong> to your PHP applications. Without a page  is loaded again, you may call your PHP functions in the same page,  submit your form to an URL and send a request to another page with any  type of data.</li>
<li><a href="http://www.xajaxproject.org/" target="_blank"><strong>Xajax</strong></a><br />
Xajax is an open source PHP library and JavaScript engine that allows  you to easily create powerful, web-based, Ajax applications using HTML,  CSS, JavaScript, and PHP that can asynchronously call server-side PHP  functions and update content.</li>
</ul>
<h3>Microformats</h3>
<ul>
<li><a href="http://code.google.com/p/xmfp/" target="_blank"><strong>Xmf  Parser</strong></a><br />
Extensible Microformats Parser for PHP 5. Currently supported  Microformats include: <strong>xfn, rel-license, rel-tag, geo, adr,  hcard, hcalendar, hreview, hresume</strong>.</li>
<li><a href="http://www.kigkonsult.se/iCalcreator/index.php" target="_blank"><strong>iCalcreator</strong></a><br />
iCalcreator is a PHP class managing <strong>iCal</strong> formatted  files for non-calendar systems like CMS, project management systems and  other applications able to process calendar information. iCalcreator  features create, parse, edit and select calendar and calendar  components.</li>
<li><a href="http://code.google.com/p/hkit/" target="_blank"><strong>hKit</strong></a><br />
A simple PHP5 tool for extracting common <strong>microformats</strong> from a page. The page can be presented as a string or a URL, and the  result is handed back as a standard PHP array structure. hkit uses  SimpleXML for parsing, and therefore requires PHP5.</li>
<li><a href="http://code.google.com/p/transformr/" target="_blank"><strong>Transformr</strong></a><br />
A Simple set of XSLT and PHP tools for Transforming Microformats.</li>
</ul>
<h3>RSS &amp; Atom Feeds</h3>
<ul>
<li><a href="http://simplepie.org/" target="_blank"><strong>SimplePie</strong></a><br />
An open sources PHP class that provides an easy to use API for handling  all of the dirty work when it comes to fetching, caching, parsing,  normalizing data structures between <strong>RSS</strong> and <strong>Atom</strong> formats, handling character encoding translation, and sanitizing the  resulting data.</li>
</ul>
<h3>Security</h3>
<ul>
<li><a href="http://php-ids.org/" target="_blank"><strong>PHP Intrusion  Detection System (PHPIDS)</strong></a><br />
A simple to use, well structured, fast and state-of-the-art <strong>security  layer</strong> for your PHP based web application. The IDS neither  strips, sanitizes nor filters any malicious input, it simply recognizes  when an attacker tries to break your site and reacts in exactly the way  you want it to. Currently the PHPIDS detects all sorts of XSS, SQL  Injection, header injection, directory traversal, RFE/LFI, DoS and LDAP  attacks. Based on a set of approved and heavily tested filter rules any  attack is given a numerical impact rating which makes it easy to decide  what kind of action should follow the hacking attempt. This could range  from simple logging to sending out an emergency mail to the development  team, displaying a warning message for the attacker or even ending the  user’s session.</li>
</ul>
<h3>Testing &amp; Debugging</h3>
<ul>
<li><a href="http://www.phpunit.de/" target="_blank"><strong>PHPUnit</strong></a><br />
PHPUnit is a member of the  <strong>xUnit</strong> family of testing  frameworks and provides both a framework that makes the writing of tests  easy as well as the functionality to easily run the tests and analyze  their results.</li>
<li><a href="http://simpletest.sourceforge.net/" target="_blank"><strong>SimpleTest</strong></a><br />
SimpleTest is is similar to <strong>JUnit</strong>/PHPUnit. It supports  mock objects and can be used to automate the regression testing of web  applications with a scriptable HTTP Client that can parse HTML pages and  simulate things like clicking on links and submitting forms.</li>
<li><a href="http://www.php-debug.com/" target="_blank"><strong>PHP  Debug</strong></a><br />
Provides assistance in <strong>debugging</strong> PHP code, by program  trace, variables display, process time, included files, queries  executed, watch variables… This information is gathered through the  script execution and therefore are displayed at the end of the script  (in a nice floating div or a html table) so that it can be read and used  at any moment.</li>
</ul>
<h3>Web Services</h3>
<ul>
<li><a href="http://keithdevens.com/software/xmlrpc" target="_blank"><strong>XML-RPC  Library for PHP</strong></a><br />
a fully compliant XML-RPC client and server written in pure PHP. Only  requirements are PHP, and the XML parser you’re guaranteed to have if  you’re using PHP built into Apache (which most people are).</li>
<li><strong>PHP API Libraries &amp; Wrapper Classes For Popular Services</strong>
<ul>
<li><a href="http://developer.amazonwebservices.com/connect/kbcategory.jspa?categoryID=131" target="_blank"><strong>Amazon</strong> Web Services</a></li>
<li><a href="http://bingapiphp.codeplex.com/" target="_blank"><strong>Bing</strong> API PHP Library</a></li>
<li><a href="http://delicious.com/help/api" target="_blank"><strong>Delicious</strong></a> – <a href="http://www.phpdelicious.com/" target="_blank">PhpDelicious</a></li>
<li><a href="http://apidoc.digg.com/" target="_blank"><strong>Digg</strong></a> <a href="http://www.rawseo.com/news/2009/05/06/how-to-use-the-digg-api/" target="_blank">PHP API</a></li>
<li><a href="http://wiki.developers.facebook.com/index.php/PHP" target="_blank"><strong>Facebook</strong> – Official PHP Client Library</a></li>
<li><a href="http://www.phpflickr.com/" target="_blank"><strong>Flickr</strong> – phpFlickr</a></li>
<li><a href="http://www.maxmind.com/app/php" target="_blank"><strong>GeoIP</strong> PHP API</a></li>
<li><a href="http://framework.zend.com/download/webservices" target="_blank"><strong>Google</strong>’s Data APIs</a></li>
<li><a href="http://en.gravatar.com/site/implement/php" target="_blank"><strong>Gravatar</strong></a>:  <a href="http://www.talkphp.com/script-giveaway/1905-gravatar-wrapper-class.html" target="_blank">Gravatar Wrapper Class</a></li>
<li><a href="https://cms.paypal.com/us/cgi-bin/?cmd=_render-content&amp;content_ID=developer/library_download_sdks" target="_blank"><strong>PayPal</strong> API</a></li>
<li><a href="http://recaptcha.net/plugins/php/" target="_blank"><strong>reCAPTCHA</strong> – PHP Library</a></li>
<li><a href="http://apiwiki.twitter.com/Twitter-API-Documentation" target="_blank"><strong>Twitter:</strong></a> <a href="http://emmense.com/php-twitter/" target="_blank">PHP Twitter</a>, <a href="http://simon.wippich.org/private-projects/php/twitter-class.html" target="_blank">Twitter Class</a></li>
<li><a href="http://developer.yahoo.com/php/" target="_blank"><strong>Yahoo!</strong> Web Services APIs</a></li>
</ul>
</li>
<li>Find More Web Services API at <a href="http://www.programmableweb.com/apis/directory/1?format=PHP" target="_blank">ProgrammableWeb</a></li>
</ul>
<h3>Miscellaneous</h3>
<ul>
<li><strong><a href="http://peter.upfold.org.uk/projects/wpget" target="_blank">WPGet</a></strong><br />
WPGet is a script that is designed to allow you to include a short  summary of your recent blog posts on your website. Specifically, it  works with WordPress and is great for integrating a WordPress blog into a  site that isn’t completely powered by the WP platform.</li>
</ul>
<h3>Additional Resources</h3>
<p>Here are some additional resources to help you find PHP classes,  libraries and code snippets that you may still be looking for:</p>
<ul>
<li><a href="http://www.phpclasses.org/" target="_blank">PHP Classes</a></li>
<li><a href="http://php.resourceindex.com/Functions_and_Classes/" target="_blank">The PHP Resource Index</a></li>
<li><a href="http://best-php-scripts.com/library_classes.htm" target="_blank">Best PHP Scripts</a></li>
<li><a href="http://www.codango.com/php/dir/components/" target="_blank">Codango  PHP Resource Guide</a></li>
<li><a href="http://snipt.net/public/tag/php" target="_blank">Snipt</a></li>
<li><a href="http://viralpatel.net/blogs/2009/05/15-very-useful-php-code-snippets-for-php-developers.html" target="_blank">15 very useful PHP code snippets for PHP developers</a> – ViralPatel</li>
<li><a href="http://webdeveloperplus.com/php/21-really-useful-handy-php-code-snippets/" target="_blank">21 Really Useful &amp; Handy PHP Code Snippets</a> –  Web Developer Plus</li>
<li><a href="http://www.jonasjohn.de/snippets/php/" target="_blank">Jonas  John’s PHP Snippets Collection</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://iphp.com.ua/archives/514/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Really Useful Tools For PHP Developers</title>
		<link>http://iphp.com.ua/archives/510</link>
		<comments>http://iphp.com.ua/archives/510#comments</comments>
		<pubDate>Sat, 27 Feb 2010 00:34:30 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://iphp.com.ua/archives/510</guid>
		<description><![CDATA[Whether you are a PHP novice or an experienced developer; tools that  you use have direct impact on your productivity. W3Avenue has compiled a  list of really useful extensions &#38; tools for PHP developers that  will help you speed up development and significantly improve overall  quality of your code.

Accelerators

eAccelerator
Free open-source PHP [...]]]></description>
			<content:encoded><![CDATA[<p>Whether you are a PHP novice or an experienced developer; tools that  you use have direct impact on your productivity. W3Avenue has compiled a  list of really useful extensions &amp; tools for PHP developers that  will help you speed up development and significantly improve overall  quality of your code.</p>
<p><span id="more-510"></span></p>
<h3>Accelerators</h3>
<ul>
<li><a href="http://eaccelerator.net/" target="_blank">eAccelerator</a><br />
Free open-source PHP accelerator, optimizer, and dynamic content cache.  It increases the performance of PHP scripts by caching them in their  compiled state, so that the overhead of compiling is almost completely  eliminated. It also optimizes scripts to speed up their execution.  eAccelerator typically reduces server load and increases the speed of  your PHP code by 1-10 time.</li>
<li><a href="http://www.php-accelerator.co.uk/" target="_blank">ionCube  PHP Accelerator</a><br />
The ionCube PHP Accelerator is an easily installed PHP Zend engine  extension that provides a PHP cache, and is capable of delivering a  substantial acceleration of PHP scripts without requiring any script  changes, loss of dynamic content, or other application compromises.</li>
</ul>
<h3>Build System</h3>
<ul>
<li><a href="http://phing.info/" target="_blank">Phing</a><br />
A project build system based on Apache Ant. You can do anything with it  that you could do with a traditional build system like GNU make, and its  use of simple XML build files and extensible PHP “task” classes make it  an easy-to-use and highly flexible build framework. Features include  running PHPUnit and SimpleTest unit tests, file transformations, file  system operations, interactive build support, SQL execution, CVS/SVN  operations, tools for creating PEAR packages, and much more.</li>
</ul>
<h3>Code</h3>
<ul>
<li><a href="http://www.beautifyphp.com/" target="_blank">BeautifyPHP</a><br />
Beautify PHP is a completely free service that allows visitors to  properly format their PHP code according to PEAR standards.</li>
<li><a href="http://pear.php.net/package/PHP_Beautifier" target="_blank">PHP  Beautifier</a><br />
This program reformat and beautify PHP 4 and PHP 5 source code files  automatically. The program is Open Source and distributed under the  terms of PHP Licence. It is written in PHP 5 and has a command line  tool.</li>
<li><a href="http://www.phpobjectgenerator.com/" target="_blank">PHP  Object Generator (POG)</a><br />
an open source PHP code generator which automatically generates clean  &amp; tested Object Oriented code for your PHP4/PHP5 application. By  generating PHP objects with integrated CRUD methods, POG gives you a  head start in any project.</li>
<li><a href="http://uml2php5.zpmag.com/en/index.php" target="_blank">UML2PHP5</a><br />
UML2PHP5 is a plugin designed to fit on the <a href="http://live.gnome.org/Dia" target="_blank">Dia diagram application</a>.  It automatically generates the PHP code structure following the  diagram’s classes.</li>
<li><a href="http://www.dpriver.com/" target="_blank">Instant SQL  Formatter</a><br />
Instant SQL Formatter is a free online SQL tidy tool. In addition to  beautifying SQL code, It can translate SQL code into C#, Java, <strong>PHP</strong>,  DELPHI and other program languages. It also allows you to find out all  database objects such as table, column, function in SQL by selecting  output format to list database object.</li>
<li><a href="http://www.phpmyedit.org/" target="_blank">phpMyEdit</a><br />
MySQL Table Editor and PHP Code Generator. Important features offered by  phpMyEdit are: table manipulation code generation; record addition,  change, view, copy and removal; table paging, sorting and filtering;  lookups into other tables (1:M bindings); permission configuration;  multiple navigation style possibilities; output design control using  CSS; logging user actions; Multilanguage support;ability to extend base  class.</li>
<li><a href="http://www.raizlabs.com/software/phpobfuscator/" target="_blank">PHP Obfuscator</a><br />
Encodes and obfuscates PHP code to make the output difficult to reverse  engineer. The application requires no pre-modifications to your code and  no additional components on your server. This product allows for  encoding of functions, variables and the removal of whitespace.</li>
<li><a href="http://www.codeeclipse.com/" target="_blank">Code Eclipse</a><br />
A PHP obfuscator that turns normal, easy to read PHP code into  gibberish; with little to no loss of speed and no loss of compatibility.</li>
</ul>
<h3>Database</h3>
<ul>
<li><a href="http://phpdataservices.codeplex.com/" target="_blank">PHP  Toolkit for ADO .NET Data Services</a><br />
Enables PHP developers to access data services created using ADO .NET  Data Services framework. The goal is to provide the similar  functionality as .NET library to access and modify the data and its  relationship using URIs which points to pieces of data integrated with  the web.</li>
<li><a href="http://propel.phpdb.org/" target="_blank">Propel</a><br />
Propel is an Object-Relational Mapping (ORM) framework for PHP5. It  allows you to access your database using a set of objects, providing a  simple API for storing and retrieving data.</li>
<li><a href="http://adodb.sourceforge.net/" target="_blank">ADOdb</a><br />
An object oriented library written in PHP that abstracts database  operations for portability. It is modeled on Microsoft’s <strong>ADO</strong>,  but has many improvements that make it unique (eg. <strong>Pivot Tables</strong>,  <strong>Active Record</strong> support, generating HTML for paging  recordsets with next and previous links, cached recordsets, HTML menu  generation, etc). Supports large number of databases including: MySQL,  PostgreSQL, Interbase, Firebird, Informix, Oracle, MS SQL, Foxpro,  Access, ADO, Sybase, FrontBase, DB2, SAP DB, SQLite, Netezza, LDAP, and  generic ODBC, ODBTP.</li>
<li><a href="http://www.doctrine-project.org/" target="_blank">Doctrine</a><br />
Doctrine is an object relational mapper (<strong>ORM</strong>) for PHP  5.2.3+ that sits on top of a powerful database abstraction layer (DBAL).  One of its key features is the option to write database queries in a  proprietary object oriented SQL dialect called Doctrine Query Language  (DQL), inspired by Hibernates HQL. This provides developers with a  powerful alternative to SQL that maintains flexibility without requiring  unnecessary code duplication.</li>
</ul>
<h3>Debugging</h3>
<ul>
<li><a href="http://www.xdebug.org/" target="_blank">Xdebug – Debugger  and Profiler Tool</a><br />
The Xdebug extension helps you debug your script by providing a lot of  valuable information. The debug information that Xdebug can provide  includes: stack traces and function traces in error messages, memory  allocation and protection for infinite recursions. Xdebug also provides:  profiling information for PHP scripts, code coverage analysis,  capabilities to debug your scripts interactively with a debug client.  You should also check: <a href="http://code.google.com/p/webgrind/" target="_blank">Webgrind</a> – Xdebug Profiling Web Frontend in PHP, <a href="http://www.bluestatic.org/software/macgdbp/" target="_blank">MacGDBp</a> – Mac OS X application that remotely debug their running PHP  applications powered by Xdebug.</li>
<li><a href="http://www.firephp.org/" target="_blank">FirePHP</a><br />
FirePHP is ideally suited for AJAX development where clean JSON and XML  responses are required. FirePHP enables you to log to your Firebug  Console using a simple PHP method call. All data is sent via response  headers and will not interfere with the content on your page.</li>
<li><a href="http://www.php-debugger.com/" target="_blank">DBG – PHP  Debugger and Profiler</a><br />
DBG is a a full-featured PHP debugger, an interactive tool that helps  you debugging php scripts. It works on a production and/or development  WEB server and allows you debug your scripts locally or remotely, from  an IDE or console.</li>
<li><a href="http://www.php-debug.com/" target="_blank">PHP Debug</a><br />
Provides assistance in debugging PHP code, by program trace, variables  display, process time, included files, queries executed, watch  variables… This information is gathered through the script execution and  therefore are displayed at the end of the script (in a nice floating  div or a html table) so that it can be read and used at any moment.</li>
<li><strong>More:</strong> <a href="http://phpdebuglib.de/" target="_blank">Debuglib</a>, <a href="http://krumo.sourceforge.net/" target="_blank">Krumo</a></li>
</ul>
<h3>Development</h3>
<ul>
<li><a href="http://matrix.squiz.net/developer/tools/php_cs" target="_blank">PHP CodeSniffer</a><br />
PHP CodeSniffer is a PHP5 script that tokenizes and “sniffs” PHP code to  detect violations of a defined set of coding standards. It is an  essential development tool that ensures that your code remains clean and  consistent. It can even help prevent some common semantic errors made  by developers.</li>
<li><a href="http://manual.phpdoc.org/" target="_blank">phpDocumentor</a><br />
Similar to Javadoc, and written in php, phpDocumentor can be used from  the command line or a web interface to create professional <strong>documentation</strong> from php source code. phpDocumentor has support for linking between  documentation, incorporating user level documents like tutorials and  creation of highlighted source code with cross referencing to PHP  general documentation.</li>
<li><a href="http://www.pdepend.org/" target="_blank">PHP Depend</a><br />
PHP Depend is software analyzer and metric tool which aims to provide  many useful information about a specified PHP project. PHP Depend can  generate a large set of software metrics from a given code base, these  values can be used to measure the quality of a software project and they  help to identify that parts of an application where a refactoring  should be applied.</li>
<li><a href="http://phplangeditor.mozdev.org/" target="_blank">phpLangEditor</a><br />
A Firefox add-on that will allow you to easily translate language files  and variables in your PHP scripts.</li>
</ul>
<h3>IDE &amp; Editors</h3>
<ul>
<li><a href="http://www.aptana.com/php" target="_blank">Aptana PHP  Development Environment</a><br />
Aptana PHP is the robust, free, open source IDE for PHP featuring  everything you need to get started fast and get even faster with  developing, testing, tuning, and deploying your PHP apps. From  pre-installed PHP servers, code assist, code templates, code generation,  debugging, refactoring, Smarty editor, database tools and more, Aptana  PHP gives you the end-to-end tools you need for PHP plus all the rest  that Aptana Studio has to offer.</li>
<li><a href="http://www.phpeclipse.com/" target="_blank">PHPEclipse</a><br />
PHPEclipse runs on all the major OS platforms and has the following  features: Syntax Coloring, Brackets Matching, Code folding, Code  Completion, PHP Manual integration, Code templates, XDebug support, DBG  Support, CVS &amp; SVN++ support.</li>
<li><a href="http://www.zend.com/products/studio/" target="_blank">Zend  Studio</a><br />
A professional-grade development environment that includes PHP code  editing, debugging, profiling, unit testing, diagnostics and more.</li>
<li><a href="http://phpanywhere.net/" target="_blank">PHPanywhere</a><br />
A web based free Integrated Development Environment for the PHP  language, in other words it is an application that gives developers all  the code editing capabilities they need to develop PHP applications  online. It includes a real-time syntax code editor with support for all  web formats and a powerful FTP editor.</li>
<li><a href="http://www.jcxsoftware.com/vs.php" target="_blank">VS.Php  For Visual Studio</a><br />
VS.Php is a PHP integrated development environment based on Visual  Studio 2008. With VS.Php you can design, develop, debug and deploy PHP  applications within the Visual Studio IDE.</li>
<li><strong>More:</strong> <a href="http://www.netbeans.org/features/php/index.html" target="_blank">NetBeans</a>,  <a href="http://www.nusphere.com/products/phped.htm" target="_blank">PhpED</a>,  <a href="http://www.phpedit.com/en" target="_blank">PHPEdit</a>, <a href="http://www.mpsoftware.dk/phpdesigner.php" target="_blank">phpDesigner</a>,  <a href="http://macromates.com/" target="_blank">TextMate</a>, <a href="http://www.activestate.com/komodo/" target="_blank">Komodo IDE</a></li>
</ul>
<h3>Security</h3>
<ul>
<li><a href="http://php-ids.org/" target="_blank">PHP Intrusion  Detection System (PHPIDS)</a><br />
A simple to use, well structured, fast and state-of-the-art security  layer for your PHP based web application. The IDS neither strips,  sanitizes nor filters any malicious input, it simply recognizes when an  attacker tries to break your site and reacts in exactly the way you want  it to. Currently the PHPIDS detects all sorts of XSS, SQL Injection,  header injection, directory traversal, RFE/LFI, DoS and LDAP attacks.  Based on a set of approved and heavily tested filter rules any attack is  given a numerical impact rating which makes it easy to decide what kind  of action should follow the hacking attempt. This could range from  simple logging to sending out an emergency mail to the development team,  displaying a warning message for the attacker or even ending the user’s  session.</li>
<li><a href="http://phpsec.org/projects/phpsecinfo/index.html" target="_blank">PhpSecInfo</a><br />
PhpSecInfo provides an equivalent to the phpinfo() function that reports  security information about the PHP environment, and offers suggestions  for improvement. It is not a replacement for secure development  techniques, and does not do any kind of code or app auditing, but can be  a useful tool in a multilayered security approach.</li>
</ul>
<h3>Setup</h3>
<ul>
<li><a href="http://www.analogx.com/contents/download/network/phpconf.htm" target="_blank">PHPConfig</a><br />
A graphical frontend to PHP’s php.ini file, where all of the  configuration of PHP takes place. The end result is that you can spend  more time on your PHP code and less on tweaking ini file. It supports  all of the standard PHP functionality, and has a special tab to handle  any 3rd party plugins.</li>
<li><a href="http://www.lighty2go.com/" target="_blank">Lighty2Go</a><br />
Lighty2Go is a, portable LightTPD, MySQL &amp; PHP (LiMP) stack on a  stick for Windows. Take it with you on your USB thumdrive and have some  fun.</li>
<li><a href="http://wiki.opensource.nokia.com/projects/PAMP" target="_blank">PAMP</a><br />
Personal AMP – Apache, MySQL and PHP – stack for the S60 mobile phone.</li>
<li><a href="http://www.wampserver.com/" target="_blank">WampServer</a><br />
Allows you to setup Apache, PHP and the MySQL database on Windows. It  also comes with PHPMyAdmin to easily manage your databases. WampServer  allows you to add as many Apache, MySQL and PHP releases as you want.</li>
<li><a href="http://www.server2go-web.de/" target="_blank">Server2Go</a><br />
A Webserver that runs out of the box without any installation and on  write protected media. This means that web applications based on  Server2Go can be used directly from CD ROM, a USB stick or from any  folder on a hard disk without the hassle of configuring Apache, PHP or  MySQL.</li>
</ul>
<h3>Testing</h3>
<ul>
<li><a href="http://www.phpunit.de/" target="_blank">PHPUnit</a><br />
PHPUnit is a member of the  xUnit family of testing frameworks and  provides both a framework that makes the writing of tests easy as well  as the functionality to easily run the tests and analyze their results.</li>
<li><a href="http://simpletest.sourceforge.net/" target="_blank">SimpleTest</a><br />
SimpleTest is is similar to JUnit/PHPUnit. It supports mock objects and  can be used to automate the regression testing of web applications with a  scriptable HTTP Client that can parse HTML pages and simulate things  like clicking on links and submitting forms.</li>
<li><a href="http://code.google.com/p/bovigo/wiki/vfsStream" target="_blank">vfsStream</a><br />
vfsStream is a stream wrapper for a virtual file system that may be  helpful in unit tests to mock the real file system. It can be used with  any unit test framework, like PHPUnit or SimpleTest.</li>
</ul>
<h3>Continuous Integration</h3>
<ul>
<li><a href="http://phpundercontrol.org/" target="_blank">phpUnderControl</a><br />
phpUnderControl is an addon application for the continuous integration  tool CruiseControl, which integrates some of the best PHP development  tools. This project aims to make your first steps with CruiseControl and  PHP as easy as possible. Therefore phpUnderControl comes with a command  line tool that performs all modifications to an existing CruiseControl  installation.</li>
</ul>
<h3>Cheet Sheets</h3>
<ul>
<li><a href="http://www.addedbytes.com/cheat-sheets/php-cheat-sheet/" target="_blank">PHP Cheat Sheet From AddedBytes</a><br />
The PHP cheat sheet is a one-page reference sheet, listing date format  arguments, regular expression syntax and common functions.</li>
<li><a href="http://www.serversidemagazine.com/cheat-sheets/PHP5/" target="_blank">PHP 5 Online Cheat Sheet</a><br />
Covering Type: Boolean, Integer, String, Array, Object/Class; String:  functions, conversion; Array: functions, conversion;  Class: definition,  member declaration, member visibility; Date/Time: functions, formats;  Predefined Variables: $_SERVER$_FILES</li>
<li><a href="http://cakephp.org/downloads/Resources" target="_blank">The  CheatSheet – CakePHP 1.2</a><br />
Includes quick reference to CakePHP Config variables, Global Functions,  Conventions, Paths and index.php file. It also provides reference for  Properties, Methods &amp; Callback functions for Models, View,  Controller and Helper classes.</li>
<li><a href="http://koivi.com/apache-iis-php-server-array.php" target="_blank">PHP $_SERVER Superglobal on Apache &amp; IIS</a><br />
A table of keys that are defined in PHP’s $_SERVER superglobal array  running on Apache and IIS servers. The purpose of this table is to allow  PHP developers an insight of what to expect if they must migrate from  one platform to another.</li>
<li><a href="http://hasin.wordpress.com/2006/06/10/smarty-cheat-sheet-version-20/" target="_blank">Smarty Cheat Sheet</a><br />
Anyone still interested in Smarty can use this cheat sheet. Contains  quick tips and reference for Smarty template designers.</li>
<li><a href="http://code.google.com/p/codeigniter-1-7-1-quick-reference-cheatsheet/" target="_blank">CodeIgniter Quick Reference Cheat Sheet</a><br />
Available in PDF &amp; PNG format; Codeigniter cheat sheet contains  library functions with parameters, helpers functions &amp; CodeIgniter  reserved names etc.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://iphp.com.ua/archives/510/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Работает ли Daemon Tools под Windows 7?</title>
		<link>http://iphp.com.ua/archives/506</link>
		<comments>http://iphp.com.ua/archives/506#comments</comments>
		<pubDate>Wed, 20 Jan 2010 00:45:36 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Soft/Tools]]></category>

		<guid isPermaLink="false">http://iphp.com.ua/?p=506</guid>
		<description><![CDATA[Получили при установке сообщение вроде: &#8220;This program require at least Windows 2000 with SPTD 1.60 or higher. Kernel debugger must be deactivated&#8221; ?
Решение:
Откройте редактор реестра, найдите ключ
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Servic es\SPTD
и измените значение Start на 4.
Теперь перезагрузите компьютер и вернитесь к этому же ключу. Смените права доступа к ключу &#8211; нажмите правой кнопкой на ключе, &#8220;Разрешения&#8230;&#8221; и выставьте [...]]]></description>
			<content:encoded><![CDATA[<p>Получили при установке сообщение вроде: &#8220;This program require at least Windows 2000 with SPTD 1.60 or higher. Kernel debugger must be deactivated&#8221; ?</p>
<p>Решение:</p>
<p>Откройте редактор реестра, найдите ключ</p>
<p>HKEY_LOCAL_MACHINE\System\CurrentControlSet\Servic es\SPTD</p>
<p>и измените значение Start на 4.</p>
<p>Теперь перезагрузите компьютер и вернитесь к этому же ключу. Смените права доступа к ключу &#8211; нажмите правой кнопкой на ключе, &#8220;Разрешения&#8230;&#8221; и выставьте &#8220;Полный доступ&#8221; для всех.</p>
<p>Удалите этот ключ, перезагрузите компьютер и установите Daemon Tools еще раз.</p>
]]></content:encoded>
			<wfw:commentRss>http://iphp.com.ua/archives/506/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title></title>
		<link>http://iphp.com.ua/archives/502</link>
		<comments>http://iphp.com.ua/archives/502#comments</comments>
		<pubDate>Tue, 19 Jan 2010 01:30:27 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Cars]]></category>

		<guid isPermaLink="false">http://iphp.com.ua/archives/502</guid>
		<description><![CDATA[Остап Бендер, как известно, знал 400 относительно честных способов отъема денег у населения. Но и он позавидовал бы нынешним кидалам в умении &#8220;развести&#8221; на деньги. По нашим наблюдениям, автомобилисты становятся жертвами преступников наиболее часто. По словам майора милиции Валерия Древило, эта категория людей так привлекает мошенников по нескольким причинам. Во-первых, у водителей практически всегда есть [...]]]></description>
			<content:encoded><![CDATA[<p>Остап Бендер, как известно, знал 400 относительно честных способов отъема денег у населения. Но и он позавидовал бы нынешним кидалам в умении &#8220;развести&#8221; на деньги. По нашим наблюдениям, автомобилисты становятся жертвами преступников наиболее часто. По словам майора милиции Валерия Древило, эта категория людей так привлекает мошенников по нескольким причинам. Во-первых, у водителей практически всегда есть с собой деньги (как минимум, на бензин), во-вторых, автомобилист &#8211; не самая бедная прослойка населения: на последние &#8220;кровные&#8221; машину не покупают.</p>
<p>Способов &#8220;развода&#8221; на сегодня придумали множество. Мы расскажем о наиболее популярных из них.</p>
<p><strong>Покупка в группах </strong></p>
<p>&#8220;Автомобиль за 300-500 грн. в месяц&#8221; &#8211; такое объявление на рекламном плакате часто можно увидеть в крупных торговых центрах рядом с новеньким автомобилем, который призывно ждет своего хозяина. Деньги вроде небольшие &#8211; почему бы не поинтересоваться условиями? А вдруг правда?</p>
<p><strong>Уловка мошенника. </strong>Рядом с автомобилем всегда стоит стол, за которым сидит приятный на вид молодой человек или девушка с &#8220;честными&#8221; глазами. Предлагают здесь купить автомобиль по особой схеме: 1000 человек скидываются по 300 грн. и на эти деньги покупают 5 автомобилей по 60 тыс. грн. за штуку. Между участниками группы проводится розыгрыш, и каждый двухсотый получает автомобиль. Остальные продолжают платить по 300 грн. и привлекают новых участников &#8220;лотереи&#8221;. В следующем месяце разыгрывают еще 50 автомобилей. Цикл продолжается до тех пор, пока все участники группы не получат по автомобилю. Как тут не поверить в чудо и удачу? Доверие подкрепляется еще и тем, что сотрудник компании-пирамиды показывает кучу документов, лицензий, гарантий.</p>
<p><strong>На самом деле. </strong>Платить по 300 грн. в месяц можно годами. Каждый месяц будут приходить уведомления о том, что в этом месяце &#8220;выиграли не вы&#8221;. В любой момент из группы можно выйти, но есть одна незадача &#8211; вступительный взнос и ежемесячные взносы не возвращаются. Нам в редакцию присылают письма читатели, которые пытаются получить автомобиль по 5-6 лет. &#8220;За это время я бы уже давно выплатил обычный кредит&#8221;, &#8211; пишет Алексей Н. из Донецка.</p>
<p><strong>Полезный совет.</strong> Категорически не советуем участвовать в каких-либо схемах, напоминающих пирамиду хотя бы отдаленно. Помните, что бесплатный сыр бывает только в мышеловке.</p>
<p><em>Комментарий психолога. </em>По словам психолога Центра практической психологии и психоанализа &#8220;Имаго&#8221; Татьяны Назаренко, наиболее уязвимы для участия в таких группах люди, психика которых находится в угнетенном состоянии (стресс, депрессия). &#8220;В ситуациях, когда человеку очень сложно справиться с восприятием реальности, психика человека начинает регрессировать. Для того, чтобы защититься от тревоги, человек начинает пользоваться &#8220;магическим&#8221; мышлением. Человеку начинает казаться, что с помощью определенных ритуалов, действий (например ежемесячных взносов) он может присоединиться к какой-то большой и всесильной структуре, и это даст ему возможность обладать чем-то таким, что другим недоступно, не прилагая к этому серьезных усилий&#8221;, &#8211; говорит эксперт.<span id="more-502"></span></p>
<p><strong>Дорожные подставы </strong></p>
<p>С середины 90-х годов, когда для многих людей стал доступен автомобиль, чрезвычайно распространился вид мошенничества, получивший жаргонное название &#8220;автоподстава&#8221;. Основных схем тут две.</p>
<p><strong>Уловка мошенника.</strong> Схема 1. ДТП с дорогим автомобилем.</p>
<p>Мошенники (как правило, опытные водители) действуют группой из двух-трех автомобилей. Они выявляют на дороге человека, который едет один и не слишком уверенно водит машину. С помощью какой-либо провокации его вынуждают совершить запланированное преступниками ДТП. Самый простой (но далеко не единственный) способ: когда жертва едет в крайнем левом ряду, одна из машин преступников, якобы &#8220;спешащая&#8221;, фарами и/или звуковым сигналом &#8220;сгоняет&#8221; более тихоходного &#8220;чайника&#8221; из левого ряда. Жертва, уступая дорогу, сдает вправо, и тут же происходит столкновение: подставная машина, которая была у жертвы в &#8220;мертвой зоне&#8221; (ее не видно в зеркала) внезапно производит ускорение и подставляется под удар. Формально в аварии оказывается виновата жертва &#8211; она якобы &#8220;подрезала&#8221; подставную машину.</p>
<p>После этого водитель и пассажиры подставной машины криками и угрозами вымогают у жертвы деньги &#8220;на ремонт&#8221;, требуя расплатиться на месте, не вызывая ГАИ и ничего не оформляя. Упирают на то, что в случае официального разбирательства сумма компенсации будет большей.</p>
<p><strong>На самом деле. </strong>Машина, &#8220;на ремонт&#8221; которой мошенники вымогают деньги, может за один день побывать в нескольких аналогичных ДТП, и в действительности сумма на восстановление минимально-приличного ее вида существенно меньше той, которую мошенникам удается отобрать у жертвы.</p>
<p><strong>Уловка мошенника. </strong>Схема 2. Сбитый пешеход.</p>
<p>Эта неприятность как правило, ждет водителя, когда автомобиль выезжает со двора или парковки супермаркета. Внезапно автомобиль сбивает пешехода, который эффектно сползает по лобовому стеклу, оставляя вмятины на капоте. Все происходит настолько быстро, что водитель даже не успевает ничего понять. Пешеход же лежит и корчится от боли. Тут же находятся свидетели, которые видели, как этого пешехода сбили, а наказание за такое правонарушение, как все знают, тяжелое. Естественно, водитель предпочитает &#8220;договориться на месте&#8221;.</p>
<p><strong>На самом деле. </strong>Под видом пешехода работает мошенник, который сам бросается на капот. &#8220;Упасть&#8221; так, чтобы остались вмятины от якобы сильного столкновения несложно &#8211; капот достаточно &#8220;нежная&#8221; деталь.</p>
<p><em>Комментарий психолога. </em>&#8220;Жертва в этом случае чувствует себя виноватой &#8211; во-первых, из-за формального нарушения правил дорожного движения, во-вторых, у жертвы, как правило, небольшой опыт вождения. ДТП &#8211; непривычный стресс, из которого человек стремится выбраться как можно скорее и совершает ошибку&#8221;, &#8211; говорит Татьяна Назаренко.</p>
<p><strong>Полезный совет.</strong> &#8220;Средством от автоподставы или, во всяком случае, минимального от нее ущерба, является страхование машины, категорический отказ от &#8220;оплаты на месте&#8221;, вызов ГАИ и представителя страховщика сразу после столкновения. Надо настаивать на том, что ущерб компенсирует страховая&#8221;, &#8211; прокомментировали нам в пресс-центре ГАИ МВД Украины. Однако нам так и не ответили, что делать водителю в том случае, если сотрудник ГАИ не видит настоящей причины ДТП, фиксирует нарушение правил жертвой ПДД и передает права в суд, где либо назначают высокий штраф, либо забирают их сроком от 1 до 2-х лет.</p>
<p><strong>Промывка двигателя </strong></p>
<p><strong>Уловка мошенника. </strong>При замене масла практически на всех СТО мастера задают стандартный вопрос: &#8220;Двигатель промывать будем?&#8221; Как правило, автолюбитель автоматически отвечает &#8220;да&#8221;. При дальнейшем разговоре мастера всегда убеждают в том, что без этого не обойтись. Стандартные аргументы: &#8220;Двигатель очищается от старого масла, мы заливаем свежее. Нужно избежать смеси прежнего масла с новым, особенно если меняется минералка на синтетику&#8221;.</p>
<p><strong>На самом деле. </strong>&#8220;Вымыть двигатель изнутри практически невозможно, особенно если там уже образовались коксовые отложения. Промывочное масло способно вымыть лишь легкие фракции: парафин, вазелин, оставляя при этом шлаковый скелет. Отломится маленький кусочек от этих костяшек, не более 2 мм, и проскочит через канал, а если нет? Перекроет подачу масла, например, в коленвал, &#8220;обезмаслит&#8221; его, после чего вал просто &#8220;задерет&#8221;, &#8211; говорит директор СТО &#8220;Вольво+&#8221; Василий Шевчик. &#8211; Кроме того, промывочное масло &#8211; масло с неизвестными допусками и стандартами. Стоит ли лить в дорогостоящий двигатель неизвестную бурду?&#8221;</p>
<p><strong>Полезный совет.</strong> Если вы все-таки приняли решение произвести промывку, лучше всего залить в двигатель рекомендуемое производителем автомобиля масло, подождать, пока оно проработает несколько дней, слить его и залить свежее вместе с заменой масляного фильтра на свежий. Смысл в процедуре промывки есть лишь в том случае, когда в двигатель попали посторонние вещества (например, если случайно залита посторонняя жидкость).</p>
<p><strong>Лекарства для двигателя </strong></p>
<p><strong>Уловка мошенника. </strong>Но мошенники ждут автомобилиста не только в тот момент, когда он хочет купить автомобиль, едет за рулем либо проводит стандартное обслуживание. Многие водители стараются улучшить свой автомобиль и ищут способы это сделать какими-то простыми методами. Специально для этой категории автолюбителей мошенники продают &#8220;чудо-средства&#8221;. &#8220;Если его залить в двигатель, по словам продавцов, старый автомобиль будет &#8220;летать как новенький&#8221;, &#8211; говорят продавцы. Стоит такое удовольствие относительно недорого &#8211; от 100 до 500 грн. Для сравнения, капремонт мотора обойдется в $600-2000.</p>
<p>&#8220;Дешевая юшка&#8221; многих автомобилистов не смущает и они с энтузиазмом несут мошенникам деньги. Да и как тут не поверить, если на глазах изумленной публики с двигателя сливают масло, а он продолжает работать &#8211; такой трюк часто демонстрируют на выставках. Различные присадки, если судить из рекламы, снижают расход аж на 30-40% и избавляют мотор от необходимости ремонта.</p>
<p><strong>На самом деле. </strong>По словам опрошенных нами специалистов, разобраться на рынке автохимии &#8220;кто есть кто&#8221; сложно. Дело в том, что часть продаваемых присадок действительно приносят двигателю пользу, но основная масса &#8211; обычное надувательство.</p>
<p><strong>Виды присадок </strong></p>
<p><strong>Реметаллизаторы. </strong>Это &#8211; составы, в которых в нейтральном носителе, полностью растворимом в масле, содержатся соединения или ионы мягких металлов. Попадая в зону трения, эти соединения заполняют микронеровности и создают плакирующий слой, восстанавливающий поверхность.</p>
<p>Замена масла быстро сводит к нулю эффект от начальной обработки реметаллизатором. Более того, даже кратковременное отсутствие препарата в масляной системе приводит к &#8220;состругиванию&#8221; защитного слоя с поверхности цилиндров поршневыми кольцами, особенно в пусковых режимах. Поэтому нередко наблюдаются случаи заклинивания двигателя после обработки такими препаратами.</p>
<p><strong><em>Тефлонсодержащие препараты. </em></strong>Тефлон &#8211; хороший антифрикционный и антипригарный материал, эффективно работающий практически сразу после попадания в зону трения. Однако хорошо известна и нестойкость тефлоновых покрытий. Потому, в частности, сомнительны утверждения некоторых фирм, будто однократная обработка двигателя препаратом этой группы обеспечивает длительность действия антифрикционного слоя на 1 млн. миль пробега.</p>
<p>Для эффективной работы присадки необходимо ее постоянное присутствие в масле. Кроме того, тефлон &#8211; отличный теплоизолятор. Наличие тефлонового слоя на стенках камеры сгорания ведет к существенному росту температур газа в цилиндре: наблюдается практически двукратный рост выхода окислов азота в отработавших газах. Опрошенные нами специалисты отмечают даже случаи, когда длительное использование тефлоновых препаратов приводило к закоксованию поршневых колец и, как следствие, перегреву поршней и выходу силового агрегата из строя.</p>
<p><strong><em>Полимерные антифрикционные препараты (модификаторы трения). </em></strong>Эти препараты создавались специалистами оборонной промышленностью и изначально имели узкое назначение &#8211; обеспечить кратковременное сохранение подвижности боевой техники в случае серьезного повреждения масляной системы.</p>
<p>При использовании данных препаратов приемный грибок масляного насоса и масляные каналы &#8220;зарастают&#8221; полимером, сечения каналов уменьшаются &#8211; это приводит к росту давления (снижает расход топлива, увеличивает мощность), но побочным эффектом является преждевременный износ подшипников двигателя. А это лечится только капремонтом.</p>
<p><strong>Ремонтно-восстановительные составы (РВС).</strong>Их действие базируется на уникальных свойствах порошка серпантивита. При трении серпантивит разлагается с выделением большого количества тепловой энергии, под воздействием которой происходит разогрев металла, внедрение в его структуру микрочастиц минерала и образование композитной металлокерамической структуры (металл-минерал), обладающей очень высокой твердостью и износостойкостью.</p>
<p>Применение РВС в двигателях сталкивается с серьезной проблемой: агрегат, обработанный минералами, теряет температурную стабильность. В результате двигатель подвергается риску перегрева. Кроме того, в процессе приработки двигателя с РВС из-за резко возросших температур цилиндра значительно увеличивается расход масла и часто отпускаются поршневые кольца. Кроме того, разработчики РВС не решили проблему того, что в моторе работают пары трения с различными механическими свойствами &#8211; на многих двигателях происходит абразивный износ отдельных узлов.</p>
<p><strong>Полезный совет. </strong> По словам директора СТО &#8220;КиевСкан&#8221; Андрея Даллакяна, никаких дополнительных присадок в двигатель лить не нужно &#8211; состав качественного моторного масла достаточно универсален. &#8220;Если двигатель плохо работает, то поможет только моторист&#8221;, &#8211; отмечает эксперт. При этом он добавляет, что после обработки мотора присадками стоимость ремонта может вырасти на 20-30%.</p>
<p><strong>Анекдот в ТЕМУ. </strong>&#8220;Я добавил в моторное масло модификатор трения, что дало мне 25% экономии топлива. Реметаллизатор дал 30%, кондиционер металла &#8211; столько же, по 28% добавили геомодификатор и тефлоновая присадка&#8230; И теперь через каждые 30 км мне приходится останавливаться отливать бензин из бака&#8221;.</p>
<p><strong>Газ для шин </strong></p>
<p><strong>Уловка мошенника. </strong>Года три назад украинские шиномонтажные мастерские стали массово предлагать новую услугу &#8211; заправку шин газом. Судя по аннотациям, в состав &#8220;шинного&#8221; газа входят азот, аргон, неон, гелий и другие полезные вещества. &#8220;Азот нужен для того, чтобы шина не окислялась, неон и гелий &#8211; для плавности хода, а также для улучшения амортизации колес и сохранения постоянного давления. В состав добавляют аргон, чтобы газовая смесь не вылетала через повреждения шины и неплотные места прилегания шины и диска&#8221;, &#8211; написано в рекламе. У супергаза, по данным продавцов, есть еще множество полезных свойств: он улучшает управляемость, устойчивость автомобиля, уменьшает тормозной путь и шум от соприкосновения шин с дорожным покрытием. Стоимость услуги &#8211; 50-100 грн. (в зависимости от &#8220;фирменности&#8221; продукта). Заправка же шин обычным воздухом стоит 5 грн.</p>
<p><strong>На самом деле.</strong> &#8220;Кроме внутреннего воздействия на резину, есть еще не менее агрессивный воздух снаружи, так что об эффекте коррозионной стойкости говорить смысла нет. То же самое касается мягкости &#8220;шинного&#8221; газа: все газы в природе имеют одинаковую жесткость&#8221;, &#8211; говорит Марк Бородай, эксперт-автотехник КНИИСЭ (Киевского научно-исследовательского института судебных экспертиз).</p>
<p>Но и это еще не все. Работник одной из шиномонтажных мастерских на условиях анонимности поведал нам, что на самом деле под видом спецгаза в шины закачивают обычный воздух. &#8220;Но клиенты все равно говорят о том, что чувствуют улучшение в поведении автомобиля. Психология&#8221;, &#8211; поясняет мастер. Фактически, шиномонтажники придумали способ делать деньги из воздуха в буквальном смысле.</p>
<p><strong>Полезный совет. </strong>Заправляйте шину обычным воздухом и ни в коем случае не переплачивайте за газ в 20-кратном размере.</p>
<p><strong>Активатор топлива </strong></p>
<p><strong>Уловка мошенника. </strong>&#8220;Хит&#8221; последних нескольких лет &#8211; активаторы топлива. На рынке предлагают устройство, которое необходимо врезать в топливопровод.</p>
<p>По данным разработчиков, когда топливо проходит через активатор, тот посредством создания электромагнитных завихрений &#8220;заряжает&#8221; молекулы бензина или дизеля, что заставляет топливо сгорать эффективнее.</p>
<p><strong>На самом деле.</strong> По мнению Александра Воронкова, директора Государственного предприятия &#8220;Научно-исследовательский институт химических технологий &#8220;Химтехнология&#8221;, при помощи одного лишь электромагнитного излучения добиться повышения экономичности невозможно. &#8220;Это шарлатанство&#8221;, &#8211; говорит эксперт. Причем, специалист по химии даже не может представить себе, каким образом электромагнитное излучение может повлиять на свойство нефтепродуктов. Подтверждают его мнение и результаты испытаний немецкого журнала &#8220;Auto Motor and Sport&#8221;, которые показали абсолютную бесполезность описанного выше девайса.</p>
<p><strong>Полезный совет. </strong>Добиться реальной экономии можно за счет изменения стиля вождения.</p>
<p><strong>Таблетки для бензина</strong></p>
<p><strong>Уловка мошенника. </strong>Последние два года на автобазарах активно продают специальные таблетки, которые следует добавлять в топливо, &#8211; так называемые биодобавки. По словам разработчиков, такая таблетка уменьшит расход топлива аж на 30%. Другие свойства таблеток: оптимизация процесса сгорания, улучшенная теплоотдача, очистка трубопровода и топливного бака. Цена &#8211; 180грн. за 10 капсул. Расход &#8211; 1 капсула на 60 литров топлива.</p>
<p><strong>На самом деле. </strong>По данным московского института НАМИ, подобные таблетки &#8211; вовсе не какая-то чудо-жидкость, а самый обычный нафталин. А средство это известно еще с 80-х годов &#8211; нафталин повышает октановое число. Правда, есть и последствия &#8211; нафталин этот образует невероятное количество нагара в топливной системе и кристаллизуется, забивая шланги, бензонасос и форсунки инжектора.</p>
<p><strong>Полезный совет.</strong> Снизить расход топлива и продлить жизнь автомобиля можно за счет использования качественного топлива, изменения манеры езды и поддержания автомобиля в идеальном техсостоянии.</p>
<p><strong>Панацея от камеры </strong></p>
<p><strong>Уловка мошенника. </strong>С введением новых штрафов за нарушение ПДД на автомобильных рынках появился новый товар &#8211; средства защиты от гаишных фото- и видеокамер.</p>
<p>Рамки и лаки. Автолюбителю на выбор предлагается огромный ассортимент самых различных рамок: лученепроницаемая, &#8220;с засветкой&#8221;, &#8220;с автоматическим затемнением&#8221;, &#8220;светоотражающая&#8221;. Стоимость &#8211; от 50 до 800 грн. По словам продавцов, для камер ГАИ номера автомобилей, оснащенных подобными устройствами автомобилей, не видны. То же самое касается работы спрея &#8220;фотоблокер&#8221;, рекламируемого в интернете, &#8211; он засвечивает снимок только при условии работы камеры с яркой вспышкой, но спецсредства ГАИ работают без нее.</p>
<p><strong>На самом деле. </strong>Принцип работы, фиксирующей функции камер ГАИ, не отличается от работы обычного фотоаппарата. Даже если сфотографировать номер обычным цифровиком, его будет прекрасно видно как с рамкой, так и без нее.</p>
<p><strong>Полезный совет. </strong>По-настоящему эффективной защитой от штрафов является езда по правилам.</p>
]]></content:encoded>
			<wfw:commentRss>http://iphp.com.ua/archives/502/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Zend Studio 7: how to automatically save before run script</title>
		<link>http://iphp.com.ua/archives/496</link>
		<comments>http://iphp.com.ua/archives/496#comments</comments>
		<pubDate>Wed, 30 Dec 2009 02:38:28 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://iphp.com.ua/?p=496</guid>
		<description><![CDATA[Everytime I run a script, the dialog box ask for saving appear. How can I configure Zend Studio(v 7.0) automatically save before running?
Open Window -&#62; Preferences
Open Run/Debug -&#62; Launching
Find the option &#8220;Save required dirty editors before launching&#8221; (top of screen) and set it to &#8220;Always&#8221; instead of &#8220;Prompt&#8221;.   
]]></description>
			<content:encoded><![CDATA[<p><em>Everytime I run a script, the dialog box ask for saving appear. How can I configure Zend Studio(v 7.0) automatically save before running?</em></p>
<p>Open<strong> Window -&gt; Preferences</strong><br />
Open <strong>Run/Debug -&gt; Launching</strong><br />
Find the option &#8220;Save required dirty editors before launching&#8221; (top of screen) and set it to &#8220;Always&#8221; instead of &#8220;Prompt&#8221;.<em> </em> <em> </em></p>
]]></content:encoded>
			<wfw:commentRss>http://iphp.com.ua/archives/496/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Art Of Scripting HTTP Requests Using Curl</title>
		<link>http://iphp.com.ua/archives/490</link>
		<comments>http://iphp.com.ua/archives/490#comments</comments>
		<pubDate>Wed, 23 Dec 2009 14:32:27 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Tools]]></category>

		<guid isPermaLink="false">http://iphp.com.ua/archives/490</guid>
		<description><![CDATA[Online:  http://curl.haxx.se/docs/httpscripting.html
This document will assume that you&#8217;re familiar with HTML and general
networking.
The possibility to write scripts is essential to make a good computer
system. Unix&#8217; capability to be extended by shell scripts and various tools to
run various automated commands and scripts is one reason why it has succeeded
so well.
The increasing amount of applications moving to [...]]]></description>
			<content:encoded><![CDATA[<p>Online:  http://curl.haxx.se/docs/httpscripting.html</p>
<p>This document will assume that you&#8217;re familiar with HTML and general<br />
networking.</p>
<p>The possibility to write scripts is essential to make a good computer<br />
system. Unix&#8217; capability to be extended by shell scripts and various tools to<br />
run various automated commands and scripts is one reason why it has succeeded<br />
so well.</p>
<p>The increasing amount of applications moving to the web has made &#8220;HTTP<br />
Scripting&#8221; more frequently requested and wanted. To be able to automatically<br />
extract information from the web, to fake users, to post or upload data to<br />
web servers are all important tasks today.</p>
<p>Curl is a command line tool for doing all sorts of URL manipulations and<br />
transfers, but this particular document will focus on how to use it when<br />
doing HTTP requests for fun and profit. I&#8217;ll assume that you know how to<br />
invoke &#8216;curl &#8211;help&#8217; or &#8216;curl &#8211;manual&#8217; to get basic information about it.</p>
<p>Curl is not written to do everything for you. It makes the requests, it gets<br />
the data, it sends data and it retrieves the information. You probably need<br />
to glue everything together using some kind of script language or repeated<br />
manual invokes.</p>
<p>1. The HTTP Protocol</p>
<p>HTTP is the protocol used to fetch data from web servers. It is a very simple<br />
protocol that is built upon TCP/IP. The protocol also allows information to<br />
get sent to the server from the client using a few different methods, as will<br />
be shown here.</p>
<p>HTTP is plain ASCII text lines being sent by the client to a server to<br />
request a particular action, and then the server replies a few text lines<br />
before the actual requested content is sent to the client.</p>
<p>Using curl&#8217;s option -v will display what kind of commands curl sends to the<br />
server, as well as a few other informational texts. -v is the single most<br />
useful option when it comes to debug or even understand the curl&lt;-&gt;server<br />
interaction.</p>
<p>2. URL</p>
<p>The Uniform Resource Locator format is how you specify the address of a<br />
particular resource on the Internet. You know these, you&#8217;ve seen URLs like<br />
http://curl.haxx.se or https://yourbank.com a million times.</p>
<p>3. GET a page</p>
<p>The simplest and most common request/operation made using HTTP is to get a<br />
URL. The URL could itself refer to a web page, an image or a file. The client<br />
issues a GET request to the server and receives the document it asked for.<br />
If you issue the command line</p>
<p>curl http://curl.haxx.se</p>
<p>you get a web page returned in your terminal window. The entire HTML document<br />
that that URL holds.</p>
<p>All HTTP replies contain a set of headers that are normally hidden, use<br />
curl&#8217;s -i option to display them as well as the rest of the document. You can<br />
also ask the remote server for ONLY the headers by using the -I option (which<br />
will make curl issue a HEAD request).<span id="more-490"></span></p>
<p>4. Forms</p>
<p>Forms are the general way a web site can present a HTML page with fields for<br />
the user to enter data in, and then press some kind of &#8216;OK&#8217; or &#8217;submit&#8217;<br />
button to get that data sent to the server. The server then typically uses<br />
the posted data to decide how to act. Like using the entered words to search<br />
in a database, or to add the info in a bug track system, display the entered<br />
address on a map or using the info as a login-prompt verifying that the user<br />
is allowed to see what it is about to see.</p>
<p>Of course there has to be some kind of program in the server end to receive<br />
the data you send. You cannot just invent something out of the air.</p>
<p>4.1 GET</p>
<p>A GET-form uses the method GET, as specified in HTML like:</p>
<pre>
<form action="junk.cgi" method="get">
<input name="birthyear" type="text" />
<input name="press" type="submit" value="OK" />
</form>
</pre>
<p>In your favorite browser, this form will appear with a text box to fill in<br />
and a press-button labeled &#8220;OK&#8221;. If you fill in &#8216;1905&#8242; and press the OK<br />
button, your browser will then create a new URL to get for you. The URL will<br />
get &#8220;junk.cgi?birthyear=1905&amp;press=OK&#8221; appended to the path part of the<br />
previous URL.</p>
<p>If the original form was seen on the page &#8220;www.hotmail.com/when/birth.html&#8221;,<br />
the second page you&#8217;ll get will become<br />
&#8220;www.hotmail.com/when/junk.cgi?birthyear=1905&amp;press=OK&#8221;.</p>
<p>Most search engines work this way.</p>
<p>To make curl do the GET form post for you, just enter the expected created<br />
URL:</p>
<p>curl &#8220;www.hotmail.com/when/junk.cgi?birthyear=1905&amp;press=OK&#8221;</p>
<p>4.2 POST</p>
<p>The GET method makes all input field names get displayed in the URL field of<br />
your browser. That&#8217;s generally a good thing when you want to be able to<br />
bookmark that page with your given data, but it is an obvious disadvantage<br />
if you entered secret information in one of the fields or if there are a<br />
large amount of fields creating a very long and unreadable URL.</p>
<p>The HTTP protocol then offers the POST method. This way the client sends the<br />
data separated from the URL and thus you won&#8217;t see any of it in the URL<br />
address field.</p>
<p>The form would look very similar to the previous one:</p>
<form action="junk.cgi" method="post">
<input name="birthyear" type="text" />
<input name="press" type="submit" value=" OK " /> </form>
<p>And to use curl to post this form with the same data filled in as before, we<br />
could do it like:</p>
<p>curl -d &#8220;birthyear=1905&amp;press=%20OK%20&#8243; www.hotmail.com/when/junk.cgi</p>
<p>This kind of POST will use the Content-Type<br />
application/x-www-form-urlencoded and is the most widely used POST kind.</p>
<p>The data you send to the server MUST already be properly encoded, curl will<br />
not do that for you. For example, if you want the data to contain a space,<br />
you need to replace that space with %20 etc. Failing to comply with this<br />
will most likely cause your data to be received wrongly and messed up.</p>
<p>Recent curl versions can in fact url-encode POST data for you, like this:</p>
<p>curl &#8211;data-urlencode &#8220;name=I am Daniel&#8221; www.example.com</p>
<p>4.3 File Upload POST</p>
<p>Back in late 1995 they defined an additional way to post data over HTTP. It<br />
is documented in the RFC 1867, why this method sometimes is referred to as<br />
RFC1867-posting.</p>
<p>This method is mainly designed to better support file uploads. A form that<br />
allows a user to upload a file could be written like this in HTML:</p>
<form action="upload.cgi" enctype="multipart/form-data" method="post">
<input name="upload" type="file" />
<input name="press" type="submit" value="OK" /> </form>
<p>This clearly shows that the Content-Type about to be sent is<br />
multipart/form-data.</p>
<p>To post to a form like this with curl, you enter a command line like:</p>
<p>curl -F upload=@localfilename -F press=OK [URL]</p>
<p>4.4 Hidden Fields</p>
<p>A very common way for HTML based application to pass state information<br />
between pages is to add hidden fields to the forms. Hidden fields are<br />
already filled in, they aren&#8217;t displayed to the user and they get passed<br />
along just as all the other fields.</p>
<p>A similar example form with one visible field, one hidden field and one<br />
submit button could look like:</p>
<form action="foobar.cgi" method="post">
<input name="birthyear" type="text" />
<input name="person" type="hidden" value="daniel" />
<input name="press" type="submit" value="OK" /> </form>
<p>To post this with curl, you won&#8217;t have to think about if the fields are<br />
hidden or not. To curl they&#8217;re all the same:</p>
<p>curl -d &#8220;birthyear=1905&amp;press=OK&amp;person=daniel&#8221; [URL]</p>
<p>4.5 Figure Out What A POST Looks Like</p>
<p>When you&#8217;re about fill in a form and send to a server by using curl instead<br />
of a browser, you&#8217;re of course very interested in sending a POST exactly the<br />
way your browser does.</p>
<p>An easy way to get to see this, is to save the HTML page with the form on<br />
your local disk, modify the &#8216;method&#8217; to a GET, and press the submit button<br />
(you could also change the action URL if you want to).</p>
<p>You will then clearly see the data get appended to the URL, separated with a<br />
&#8216;?&#8217;-letter as GET forms are supposed to.</p>
<p>5. PUT</p>
<p>The perhaps best way to upload data to a HTTP server is to use PUT. Then<br />
again, this of course requires that someone put a program or script on the<br />
server end that knows how to receive a HTTP PUT stream.</p>
<p>Put a file to a HTTP server with curl:</p>
<p>curl -T uploadfile www.uploadhttp.com/receive.cgi</p>
<p>6. HTTP Authentication</p>
<p>HTTP Authentication is the ability to tell the server your username and<br />
password so that it can verify that you&#8217;re allowed to do the request you&#8217;re<br />
doing. The Basic authentication used in HTTP (which is the type curl uses by<br />
default) is *plain* *text* based, which means it sends username and password<br />
only slightly obfuscated, but still fully readable by anyone that sniffs on<br />
the network between you and the remote server.</p>
<p>To tell curl to use a user and password for authentication:</p>
<p>curl -u name:password www.secrets.com</p>
<p>The site might require a different authentication method (check the headers<br />
returned by the server), and then &#8211;ntlm, &#8211;digest, &#8211;negotiate or even<br />
&#8211;anyauth might be options that suit you.<br />
Sometimes your HTTP access is only available through the use of a HTTP<br />
proxy. This seems to be especially common at various companies. A HTTP proxy<br />
may require its own user and password to allow the client to get through to<br />
the Internet. To specify those with curl, run something like:</p>
<p>curl -U proxyuser:proxypassword curl.haxx.se</p>
<p>If your proxy requires the authentication to be done using the NTLM method,<br />
use &#8211;proxy-ntlm, if it requires Digest use &#8211;proxy-digest.</p>
<p>If you use any one these user+password options but leave out the password<br />
part, curl will prompt for the password interactively.</p>
<p>Do note that when a program is run, its parameters might be possible to see<br />
when listing the running processes of the system. Thus, other users may be<br />
able to watch your passwords if you pass them as plain command line<br />
options. There are ways to circumvent this.</p>
<p>It is worth noting that while this is how HTTP Authentication works, very<br />
many web sites will not use this concept when they provide logins etc. See<br />
the Web Login chapter further below for more details on that.</p>
<p>7. Referer</p>
<p>A HTTP request may include a &#8216;referer&#8217; field (yes it is misspelled), which<br />
can be used to tell from which URL the client got to this particular<br />
resource. Some programs/scripts check the referer field of requests to verify<br />
that this wasn&#8217;t arriving from an external site or an unknown page. While<br />
this is a stupid way to check something so easily forged, many scripts still<br />
do it. Using curl, you can put anything you want in the referer-field and<br />
thus more easily be able to fool the server into serving your request.</p>
<p>Use curl to set the referer field with:</p>
<p>curl -e http://curl.haxx.se daniel.haxx.se</p>
<p>8. User Agent</p>
<p>Very similar to the referer field, all HTTP requests may set the User-Agent<br />
field. It names what user agent (client) that is being used. Many<br />
applications use this information to decide how to display pages. Silly web<br />
programmers try to make different pages for users of different browsers to<br />
make them look the best possible for their particular browsers. They usually<br />
also do different kinds of javascript, vbscript etc.</p>
<p>At times, you will see that getting a page with curl will not return the same<br />
page that you see when getting the page with your browser. Then you know it<br />
is time to set the User Agent field to fool the server into thinking you&#8217;re<br />
one of those browsers.</p>
<p>To make curl look like Internet Explorer on a Windows 2000 box:</p>
<p>curl -A &#8220;Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)&#8221; [URL]</p>
<p>Or why not look like you&#8217;re using Netscape 4.73 on a Linux (PIII) box:</p>
<p>curl -A &#8220;Mozilla/4.73 [en] (X11; U; Linux 2.2.15 i686)&#8221; [URL]</p>
<p>9. Redirects</p>
<p>When a resource is requested from a server, the reply from the server may<br />
include a hint about where the browser should go next to find this page, or a<br />
new page keeping newly generated output. The header that tells the browser<br />
to redirect is Location:.</p>
<p>Curl does not follow Location: headers by default, but will simply display<br />
such pages in the same manner it display all HTTP replies. It does however<br />
feature an option that will make it attempt to follow the Location: pointers.</p>
<p>To tell curl to follow a Location:<br />
curl -L www.sitethatredirects.com</p>
<p>If you use curl to POST to a site that immediately redirects you to another<br />
page, you can safely use -L and -d/-F together. Curl will only use POST in<br />
the first request, and then revert to GET in the following operations.</p>
<p>10. Cookies</p>
<p>The way the web browsers do &#8220;client side state control&#8221; is by using<br />
cookies. Cookies are just names with associated contents. The cookies are<br />
sent to the client by the server. The server tells the client for what path<br />
and host name it wants the cookie sent back, and it also sends an expiration<br />
date and a few more properties.</p>
<p>When a client communicates with a server with a name and path as previously<br />
specified in a received cookie, the client sends back the cookies and their<br />
contents to the server, unless of course they are expired.</p>
<p>Many applications and servers use this method to connect a series of requests<br />
into a single logical session. To be able to use curl in such occasions, we<br />
must be able to record and send back cookies the way the web application<br />
expects them. The same way browsers deal with them.</p>
<p>The simplest way to send a few cookies to the server when getting a page with<br />
curl is to add them on the command line like:</p>
<p>curl -b &#8220;name=Daniel&#8221; www.cookiesite.com</p>
<p>Cookies are sent as common HTTP headers. This is practical as it allows curl<br />
to record cookies simply by recording headers. Record cookies with curl by<br />
using the -D option like:</p>
<p>curl -D headers_and_cookies www.cookiesite.com</p>
<p>(Take note that the -c option described below is a better way to store<br />
cookies.)</p>
<p>Curl has a full blown cookie parsing engine built-in that comes to use if you<br />
want to reconnect to a server and use cookies that were stored from a<br />
previous connection (or handicrafted manually to fool the server into<br />
believing you had a previous connection). To use previously stored cookies,<br />
you run curl like:</p>
<p>curl -b stored_cookies_in_file www.cookiesite.com</p>
<p>Curl&#8217;s &#8220;cookie engine&#8221; gets enabled when you use the -b option. If you only<br />
want curl to understand received cookies, use -b with a file that doesn&#8217;t<br />
exist. Example, if you want to let curl understand cookies from a page and<br />
follow a location (and thus possibly send back cookies it received), you can<br />
invoke it like:</p>
<p>curl -b nada -L www.cookiesite.com</p>
<p>Curl has the ability to read and write cookie files that use the same file<br />
format that Netscape and Mozilla do. It is a convenient way to share cookies<br />
between browsers and automatic scripts. The -b switch automatically detects<br />
if a given file is such a cookie file and parses it, and by using the<br />
-c/&#8211;cookie-jar option you&#8217;ll make curl write a new cookie file at the end of<br />
an operation:</p>
<p>curl -b cookies.txt -c newcookies.txt www.cookiesite.com</p>
<p>11. HTTPS</p>
<p>There are a few ways to do secure HTTP transfers. The by far most common<br />
protocol for doing this is what is generally known as HTTPS, HTTP over<br />
SSL. SSL encrypts all the data that is sent and received over the network and<br />
thus makes it harder for attackers to spy on sensitive information.</p>
<p>SSL (or TLS as the latest version of the standard is called) offers a<br />
truckload of advanced features to allow all those encryptions and key<br />
infrastructure mechanisms encrypted HTTP requires.</p>
<p>Curl supports encrypted fetches thanks to the freely available OpenSSL<br />
libraries. To get a page from a HTTPS server, simply run curl like:</p>
<p>curl https://that.secure.server.com</p>
<p>11.1 Certificates</p>
<p>In the HTTPS world, you use certificates to validate that you are the one<br />
you claim to be, as an addition to normal passwords. Curl supports client-<br />
side certificates. All certificates are locked with a pass phrase, which you<br />
need to enter before the certificate can be used by curl. The pass phrase<br />
can be specified on the command line or if not, entered interactively when<br />
curl queries for it. Use a certificate with curl on a HTTPS server like:</p>
<p>curl -E mycert.pem https://that.secure.server.com</p>
<p>curl also tries to verify that the server is who it claims to be, by<br />
verifying the server&#8217;s certificate against a locally stored CA cert<br />
bundle. Failing the verification will cause curl to deny the connection. You<br />
must then use -k in case you want to tell curl to ignore that the server<br />
can&#8217;t be verified.</p>
<p>More about server certificate verification and ca cert bundles can be read<br />
in the SSLCERTS document, available online here:</p>
<p>http://curl.haxx.se/docs/sslcerts.html</p>
<p>12. Custom Request Elements</p>
<p>Doing fancy stuff, you may need to add or change elements of a single curl<br />
request.</p>
<p>For example, you can change the POST request to a PROPFIND and send the data<br />
as &#8220;Content-Type: text/xml&#8221; (instead of the default Content-Type) like this:</p>
<p>curl -d &#8220;&#8221; -H &#8220;Content-Type: text/xml&#8221; -X PROPFIND url.com</p>
<p>You can delete a default header by providing one without content. Like you<br />
can ruin the request by chopping off the Host: header:</p>
<p>curl -H &#8220;Host:&#8221; http://mysite.com</p>
<p>You can add headers the same way. Your server may want a &#8220;Destination:&#8221;<br />
header, and you can add it:</p>
<p>curl -H &#8220;Destination: http://moo.com/nowhere&#8221; http://url.com</p>
<p>13. Web Login</p>
<p>While not strictly just HTTP related, it still cause a lot of people problems<br />
so here&#8217;s the executive run-down of how the vast majority of all login forms<br />
work and how to login to them using curl.</p>
<p>It can also be noted that to do this properly in an automated fashion, you<br />
will most certainly need to script things and do multiple curl invokes etc.</p>
<p>First, servers mostly use cookies to track the logged-in status of the<br />
client, so you will need to capture the cookies you receive in the<br />
responses. Then, many sites also set a special cookie on the login page (to<br />
make sure you got there through their login page) so you should make a habit<br />
of first getting the login-form page to capture the cookies set there.</p>
<p>Some web-based login systems features various amounts of javascript, and<br />
sometimes they use such code to set or modify cookie contents. Possibly they<br />
do that to prevent programmed logins, like this manual describes how to&#8230;<br />
Anyway, if reading the code isn&#8217;t enough to let you repeat the behavior<br />
manually, capturing the HTTP requests done by your browers and analyzing the<br />
sent cookies is usually a working method to work out how to shortcut the<br />
javascript need.</p>
<p>In the actual</p>
<form> tag for the login, lots of sites fill-in random/session<br />
or otherwise secretly generated hidden tags and you may need to first capture<br />
the HTML code for the login form and extract all the hidden fields to be able<br />
to do a proper login POST. Remember that the contents need to be URL encoded<br />
when sent in a normal POST.</p>
<p>14. Debug</p>
<p>Many times when you run curl on a site, you&#8217;ll notice that the site doesn&#8217;t<br />
seem to respond the same way to your curl requests as it does to your<br />
browser&#8217;s.</p>
<p>Then you need to start making your curl requests more similar to your<br />
browser&#8217;s requests:</p>
<p>* Use the &#8211;trace-ascii option to store fully detailed logs of the requests<br />
for easier analyzing and better understanding</p>
<p>* Make sure you check for and use cookies when needed (both reading with -b<br />
and writing with -c)</p>
<p>* Set user-agent to one like a recent popular browser does</p>
<p>* Set referer like it is set by the browser</p>
<p>* If you use POST, make sure you send all the fields and in the same order as<br />
the browser does it. (See chapter 4.5 above)</p>
<p>A very good helper to make sure you do this right, is the LiveHTTPHeader tool<br />
that lets you view all headers you send and receive with Mozilla/Firefox<br />
(even when using HTTPS).</p>
<p>A more raw approach is to capture the HTTP traffic on the network with tools<br />
such as ethereal or tcpdump and check what headers that were sent and<br />
received by the browser. (HTTPS makes this technique inefficient.)</p>
</form>
]]></content:encoded>
			<wfw:commentRss>http://iphp.com.ua/archives/490/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Nginx Upload Module</title>
		<link>http://iphp.com.ua/archives/486</link>
		<comments>http://iphp.com.ua/archives/486#comments</comments>
		<pubDate>Wed, 21 Oct 2009 19:41:36 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[nginx]]></category>

		<guid isPermaLink="false">http://iphp.com.ua/?p=486</guid>
		<description><![CDATA[Valery Kholodkov has written a very cool nginx module for handling uploads.
The way this works is that you specify a location block to handle the uploads. So if you are using the standard nginx.conf for rails apps then you would add this in your server block right above your “location /” block:

    [...]]]></description>
			<content:encoded><![CDATA[<p>Valery Kholodkov has written a <a href="http://www.grid.net.ru/nginx/upload.en.html">very cool nginx module for handling uploads.</a></p>
<p>The way this works is that you specify a location block to handle the uploads. So if you are using the standard nginx.conf for rails apps then you would add this in your server block right above your “location /” block:</p>
<pre class="brush: php;">
    # Upload form should be submitted to this location
    location /upload {
      # Pass altered request body to this location
      upload_pass   @backend;

      # Store files to this location
      upload_store /tmp;

      # Set specified fields in request body
      upload_set_form_field $upload_field_name.name &quot;$upload_file_name&quot;;
      upload_set_form_field $upload_field_name.content_type &quot;$upload_content_type&quot;;
      upload_set_form_field $upload_field_name.path &quot;$upload_tmp_path&quot;;
    }

    # Pass altered request body to a proxy
    location @backend {
        proxy_pass   http://backend;
    }
</pre>
<p>Then make a simple upload form that does a multipart POST to /upload. Now you can have your Rails or Merb app on the backend with a route called /upload. In the action of your app that responds to the /upload route you will get a set of params that look like this(assume the name of your upload fields is called ‘file1’ and ‘file2’):</p>
<p>{&#8220;file2.path&#8221;=&gt;&#8221;/tmp/0000123459&#8243;, &#8220;file1.path&#8221;=&gt;&#8221;/tmp/0000123458&#8243;,<br />
&#8220;file2.content_type&#8221;=&gt;&#8221;image/png&#8221;,  &#8220;submit&#8221;=&gt;&#8221;Upload&#8221;,<br />
&#8220;file2.name&#8221;=&gt;&#8221;Picture 2.png&#8221;, &#8220;action&#8221;=&gt;&#8221;index&#8221;,<br />
&#8220;file1.name&#8221;=&gt;&#8221;Picture 1.png&#8221;,  &#8220;controller&#8221;=&gt;&#8221;test&#8221;,<br />
&#8220;file1.content_type&#8221;=&gt;&#8221;image/png&#8221;, &#8220;test&#8221;=&gt;&#8221;value&#8221;}</p>
<p>What this is doing if parsing the multi-part mime boundaries in C in the nginx plugin, putting the parsed files into files in /tmp and then stipping the multipart stuff out of the POST body and replacing it with the info you need to get the name and location of the file on disk.</p>
<p>This means that by the time the request hits your application, the expensive mime parsing is already done and you simply move the file to it’s final resting place. This is a huge win since now the hard work is done in C in nginx before your app ever gets involved.</p>
<p>Of course this is a fresh new module so do your own testing and deciding whether or not this is a fit for your needs. But I think this is a great plugin and have verified it works as advertised.</p>
]]></content:encoded>
			<wfw:commentRss>http://iphp.com.ua/archives/486/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SSH-туннелинг или замена VPN</title>
		<link>http://iphp.com.ua/archives/482</link>
		<comments>http://iphp.com.ua/archives/482#comments</comments>
		<pubDate>Wed, 21 Oct 2009 19:31:44 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[FreeBSD/Linux]]></category>
		<category><![CDATA[Soft/Tools]]></category>

		<guid isPermaLink="false">http://iphp.com.ua/?p=482</guid>
		<description><![CDATA[В последнее время довольно большое распространение получила технология VPN (Virtual Private Networks). В большинстве случаев ее используют люди для шифрования передаваемой информации через локальную сеть (защита от снифанья трафика, что довольно легко осуществить в сети, даже на свичах) и/или последующей передачи информации через Интернет (тут уже целями будет скрытие своего IP-адреса, защита от глобального снифа [...]]]></description>
			<content:encoded><![CDATA[<p>В последнее время довольно большое распространение получила технология VPN (Virtual Private Networks). В большинстве случаев ее используют люди для шифрования передаваемой информации через локальную сеть (защита от снифанья трафика, что довольно легко осуществить в сети, даже на свичах) и/или последующей передачи информации через Интернет (тут уже целями будет скрытие своего IP-адреса, защита от глобального снифа трафика всей страны (aka СОРМ, он же нынешний СОРМ2) и.д.). Многие уже давно используют данную технологию VPN, но не многие знают об ее более дешевой и мобильной альтернативе. А называется это &#8211; SSH-туннелинг.</p>
<p>Принцип данной реализации следующий. Весь сетевой софт на компе (ну или не весь) форвардится на назначенный порт (вашего локалхоста), на котором висит сервис, соединенный по SSH с сервером (а как мы знаем, соединение по SSH протоколу шифруется) и туннелирующий все запросы; далее, весь ваш трафик (уже не в зашифрованном виде) может форвардится с нашего сервера на прокси (поддерживающий туннерирование) или сокс, который передают весь трафик к необходимым адресам. Наличие прокси или сокса не обязательно, но если нам нужна полнейшая конспирация, то мы можем организовать данный сервис (proxy/socks) на другом сервере (данная схема нужна для создания цепочки адресов), но об этом позже.</p>
<p>Теперь давайте разберемся с минимальным набором инструментов и сервисов необходимых для организации данного процесса. В первую очередь нам нужна программа для организации туннеля по SSH-протоколу. Для этой задачи мы можем применить VanDyke Entunnel (http://www.vandyke.com/products/entunnel/) или Putty (http://www.web-hack.ru/download/info.php?go=35) (вкладка Connection\SSH\Tunnels). В наших примерах я буду использовать оба клиента. Далее мы можем вручную прописывать в каждой программе работу через прокси или использовать специализированную программу для перенаправления запросов, такую как ProxyCap (http://proxylabs.netwu.com), SocksCap (http://www.socks.nec.com), FreeCap (http://www.freecap.ru) и т.п. В нашем примере будет использоваться ProxyCap, как наиболее удобная софтина (кстати, через ProxyCap мы сможем сделать туннерирование даже WebMoney, которая известна защитой от такого вида софта, для скрытия IP). Так же нам понадобится SSH-аккаунт (на сервере желательно расположенном за пределами вашей страны =), который можно без проблем достать (например, я покупаю VPS-хостинг для этого) и socks`ы.</p>
<p>Первым делом создаем SSH-аккаунт. Далее, я предлагаю вам использовать socks-сервер, а не proxy, т.к. не все прокси поддерживают туннелирование. Также может оказаться, что сегодня прокси анонимный, а завтра уже и не нет (если, конечно, не вы сами отвечаете за него). Кстати, проверить свою анонимность можно здесь (http://ip.xss.ru). Как я уж говорил, мы можем использовать сокс на удаленной машине (для большей безопасности). Для примера я покажу, как установить сокс-демон. Наиболее популярные и продвинутые демоны под никсы это socks5 от Permeo/NEC (http://freeware.sgi.com/source/socks5/), Dante (http://www.inet.no/dante/) и отечественный продукт 3proxy (http://www.security.nnov.ru/soft/3proxy/). Для примера я выбрал классический демон на FreeBSD &#8211; socks5.</p>
<p>Для тестирования использовалась FreeBSD 5-ой ветки. Я устанавливал socks5 из портов (/usr/ports/net/socks5/), но и из сорцов под фряхой тоже все хорошо собирается и ставится:</p>
<pre class="brush: php;">
cd /usr/ports/net/socks5/
make install clean
rehash
</pre>
<p>Для нормальной работы демона необходим конфиг к демону socks5.conf и файл паролей socks5.passwd (если необходима аутификация к сокс-серверу по паролю):</p>
<pre class="brush: php;">
touch /usr/local/etc/socks5.conf
touch /usr/local/etc/socks5.passwd
</pre>
<p>Далее добавляем в конфиг следующие строчки:</p>
<pre class="brush: php;">
auth - - u
permit u - - - - -
SET SOCKS5_BINDINTFC 1.2.3.4:8080
SET SOCKS5_CONFFILE /usr/local/etc/socks5.conf
SET SOCKS5_PWDFILE /usr/local/etc/socks5.passwd
SET SOCKS5_MAXCHILD 128
SET SOCKS5_NOIDENT
SET SOCKS5_NOREVERSEMAP
SET SOCKS5_NOSERVICENAME
SET SOCKS5_V4SUPPORT
SET SOCKS5_ENCRYPT
SET SOCKS5_FORCE_ENCRYPT
SET SOCKS5_UDPPORTRANGE 1023-5000
</pre>
<p>Первые две строчки указывают, что необходима аутификация по логин/пароль. SOCKS5_BINDINTFC указывает на какой IP (если у сервера несколько алиасов) и порт повесить демон. SOCKS5_MAXCHILD по умолчанию 64, я советую увеличить до 128, чтобы всем юзерам (если их много) хватило потоков. Далее, идут строчки для ускорения работы демона. SOCKS5_V4SUPPORT &#8211; поддержка 4-ой версии протокола. SOCKS5_ENCRYPT и SOCKS5_FORCE_ENCRYPT поддержка шифрования, если клиент это поддерживает. За более подробной информацией по установка обращайтесь к файлам README и INSTALL, а за информацией по настройке к манам socks5(1) и socks5.conf(5).</p>
<p>Далее, заполняем файл паролей. Он имеет обычный текстовый формат и login/password разделяются в нем пробелами:</p>
<pre class="brush: php;">
user password
root toor
</pre>
<p>Теперь можно запускать демон и приступить к настройке клиентского софта:</p>
<pre class="brush: php;">
/usr/local/bin/socks5
</pre>
<p>Запускам ProxyCap (http://forum.web-hack.ru/index.php?showtopic=29262), кликаем правой кнопкой мыши на значке в трее, Preferences. На вкладке &#8220;Proxies&#8221; вписываем 127.0.0.1:8080 и устанавливаем в &#8220;Require Authorization&#8221; наш login/password на сокс. На вкладке &#8220;Rules&#8221; добавляем сначала правило для Entunnel, указав в &#8220;Rule Type&#8221; &#8211; Force direct connetion. Далее, создаем правило, для всего остального софта, трафик от которого будет шифроваться и туннелироваться через сокс. В правиле указываем &#8220;All Programs&#8221;, &#8220;Tunnel through proxy&#8221; и в выпадающем меню наш сокс. Так же можно создать правило не для всего софта, а только выборочный софт пускать через туннель или наоборот, создать правило для всего софта, но для некоторого софта сделать прямой доступ в инет (Force direct connetion). В качестве дополнения могу сказать, что если ваша сетевая программа поддерживает работу через сокс/прокси (и нет необходимости пускать сразу весь сетевой софт через туннель), то в качестве настроек прокси вы можете указать забинденный Entunnel`ем адрес и порт &#8211; 127.0.0.1:8080.</p>
<p>Запускаем Entunnel и создаем в нем новое соединение по SSH. Далее, в свойствах соединения (Port Forwarding) добавляем наш сокс. В категории &#8220;Local&#8221; вписываем 127.0.0.1:8080, а в категории &#8220;Remote&#8221; вписываем IP и порт нашего сокс-сервера. Настройка закончена! Если что-то не работает, то еще раз перечитайте все пункты настройки.</p>
<p>В случае, если вы хотите использовать SSH-аккаунт, как конечную точку (т.е. не юзать соксы или прокси), то ваши настройки должны быть следующие (на примере для Putty): на вкладке Connection\SSH\Tunnels в строке &#8220;Source port&#8221; указываем порт, на который Putty забиндится на локалхосте (например, 8080), далее ставим влажок на &#8220;Dynamic&#8221; и идем на вкладку &#8220;Session&#8221; прописывать адрес и порт сервера с SSH. Коннектимся&#8230;</p>
<p>Какие плюсы данной системы:</p>
<p>1. Для организации данной схемы не нужно устанавливать серверный софт (т.к. SSH-аккаунт и сокс можно без проблем достать в инете);<br />
2. Т.к. при SSH-соединении трафик шифруется и сжимается, то мы получаем небольшой прирост скорости работы в инете (это верно, когда сокс-демон находится на том же сервере);<br />
3. В случае, когда сокс-сервер находится на другом хосте, то мы получаем дополнительную цепочку серверов, которые повышают нам безопасность и анонимность;</p>
]]></content:encoded>
			<wfw:commentRss>http://iphp.com.ua/archives/482/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Использование метода window.open для открытия юзабильных popup&#8217;ов</title>
		<link>http://iphp.com.ua/archives/474</link>
		<comments>http://iphp.com.ua/archives/474#comments</comments>
		<pubDate>Wed, 21 Oct 2009 18:23:18 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[JavaScript]]></category>

		<guid isPermaLink="false">http://iphp.com.ua/?p=474</guid>
		<description><![CDATA[Новое окно браузера открыть не составляет труда — мы просто прописываем в теге a атрибут target со значением _blank (некоторые нерадивые товарищи, кстати, неправильно указывают вместо _blank значение _new, что приводит к тому же эффекту, но совершенно не соответствует спецификации). В то же время, часто необходимо, чтобы новое окно открывалось с дополнительными параметрами: окно должно [...]]]></description>
			<content:encoded><![CDATA[<p>Новое окно браузера открыть не составляет труда — мы просто прописываем в теге a атрибут target со значением _blank (некоторые нерадивые товарищи, кстати, неправильно указывают вместо _blank значение _new, что приводит к тому же эффекту, но совершенно не соответствует спецификации). В то же время, часто необходимо, чтобы новое окно открывалось с дополнительными параметрами: окно должно быть определённых размеров, не должна присутствовать строка состояния и т. п. Это легко достигается, как вам вероятно известно, с помощью метода window.open(URL, windowName[, parameters]).</p>
<p>Я не буду описывать все значения, которые может принимать третий аргумент функции open(). Напомню только, что их необходимо писать через запятую, без пробелов. По умолчанию все опции включены, но если вы укажите хотя бы одну, то другие все автоматически отключатся. Следующий пример открывает popup с адресной строкой, ширина окна составляет 400px, высота — 300px и окно расположено в верхнем левом углу экрана:</p>
<pre class="brush: jscript;">
popupWin = window.open(&quot;contacts.html&quot;, &quot;contacts&quot;, &quot;location,width=400,height=300,top=0&quot;);
popupWin.focus(); // передаём фокус новому окну
</pre>
<p>Ликбез закончен, теперь собственно о том, как правильно использовать метод window.open(). Точнее, как нужно ставить ссылки на новые окна, открывающиеся с помощью JavaScript&#8217;а.</p>
<p>Казалось бы, нет ничего проще — пишем что-то вроде </p>
<pre class="brush: jscript;">
&lt;a href=&quot;javascript:popupWin = window.open('contacts.html', 'contacts', 'location,width=400,height=300,top=0'); popupWin.focus();&quot;&gt;Наши координаты&lt;/a&gt;.
</pre>
<p>Часто пишут ещё так: </p>
<pre class="brush: jscript;">
&lt;a href=&quot;#&quot; onClick=&quot;popupWin = window.open('contacts.html', 'contacts', 'location,width=400,height=300,top=0'); popupWin.focus();&quot;&gt;Наши координаты&lt;/a&gt;.
</pre>
<p>На самом деле, более правильный вариант таков:</p>
<pre class="brush: jscript;">
&lt;a href=&quot;contacts.html&quot; target=&quot;_blank&quot; onClick=&quot;popupWin = window.open(this.href, 'contacts', 'location,width=400,height=300,top=0'); popupWin.focus(); return false;&quot;&gt;Наши координаты&lt;/a&gt;
</pre>
<p>Чем же последний вариант хорош? Многим. Во-первых, вы заботитесь о тех пользователях, у которых по той или иной причине не работает JavaScript. У них откроется файл в обычном новом окне браузера, и они смогут-таки узнать ваши координаты. Во-вторых, поисковые машины смогут корректно проиндексировать страницу contacts.html, не спотыкаясь на JavaScript&#8217;е. Ну а в-третьих, статусная строка будет выглядеть нормально. Вместо сбивающих с толку знаков типа «#» в статусной строке будет «человекопонятный» URL.</p>
<p>Кстати, обратите внимание на использование ссылки this.href, указывающей на атрибут href тега a. Таким образом мы избавляемся от необходимости повторно указывать адрес открываемой страницы.</p>
<p>Заметьте также, что в обработчике события onClick нужно указать return false. В противном случае, откроется два новых окна — одно из-за действия атрибута target, другое из-за JavaScript&#8217;а.</p>
]]></content:encoded>
			<wfw:commentRss>http://iphp.com.ua/archives/474/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
