Skip to content

Instantly share code, notes, and snippets.

@ertankayalar
Created June 22, 2013 14:09
Show Gist options
  • Save ertankayalar/5841003 to your computer and use it in GitHub Desktop.
Save ertankayalar/5841003 to your computer and use it in GitHub Desktop.
yii get user ip address
<?php
$newOrder->ip = Yii::app()->request->userHostAddress;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment