本文章就介绍二个函数一个是验证IP地址,另一个是获取用户的真实IP地址的函数,也是常用的两个IP操作函数.
获取用户真实IP地址,代码如下:
- function get_client_ip( )
- {
- if ( getenv( "REMOTE_ADDR" ) && strcasecmp( getenv( "REMOTE_ADDR" ), "unknown" ) )
- {
- $onlineip = getenv( "REMOTE_ADDR" );
- return $onlineip;
- }
- if ( isset( $_SERVER['REMOTE_ADDR'] ) && $_SERVER['REMOTE_ADDR'] && strcasecmp( $_SERVER['REMOTE_ADDR'], "unknown" ) )
- {
- $onlineip = $_SERVER['REMOTE_ADDR'];
- return $onlineip;
- }
- if ( getenv( "HTTP_CLIENT_IP" ) && strcasecmp( getenv( "HTTP_CLIENT_IP" ), "unknown" ) )
- {
- $onlineip = getenv( "HTTP_CLIENT_IP" );
- return $onlineip;
- }
- if ( getenv( "HTTP_X_FORWARDED_FOR" ) && strcasecmp( getenv( "HTTP_X_FORWARDED_FOR" ), "unknown" ) )
- {
- $onlineip = getenv( "HTTP_X_FORWARDED_FOR" );
- }
- return $onlineip;
- }
判断是否为IP地址,代码如下:
- function is_ip( $IP )
- {
- $IP_ARRAY = explode( ".", $IP );
- $IP_ARRAY_NUM = sizeof( $IP_ARRAY );
- if ( $IP_ARRAY_NUM != 4 )
- {
- return FALSE;
- }
- $I = 0;
- for ( ; $I < $IP_ARRAY_NUM; ++$I )
- {
- if ( !is_numeric( $IP_ARRAY[$I] ) && $IP_ARRAY[$I] < 0 || 255 < $IP_ARRAY[$I] )
- {
- return FALSE;
- }
- if ( !( $I == 3 ) && !( $IP_ARRAY[$I] == 255 ) )
- {
- continue;
- }
- return FALSE;
- }
- return TRUE;
- }
波比源码 – 精品源码模版分享 | www.bobi11.com
1. 本站所有资源来源于用户上传和网络,如有侵权请邮件联系站长!
2. 分享目的仅供大家学习和交流,您必须在下载后24小时内删除!
3. 不得使用于非法商业用途,不得违反国家法律。否则后果自负!
4. 本站提供的源码、模板、插件等等其他资源,都不包含技术服务请大家谅解!
5. 如有链接无法下载、失效或广告,请联系管理员处理!
6. 本站资源售价只是赞助,收取费用仅维持本站的日常运营所需!
7. 本站源码并不保证全部能正常使用,仅供有技术基础的人学习研究,请谨慎下载
8. 如遇到加密压缩包,请使用WINRAR解压,如遇到无法解压的请联系管理员!
波比源码 » php中获取真实IP地址与IP地址验证函数
波比源码 » php中获取真实IP地址与IP地址验证函数
levofloxacin 500mg oral levofloxacin medication
avodart cost dutasteride over the counter zofran 4mg brand
purchase spironolactone online cheap order diflucan 100mg without prescription buy fluconazole 200mg
ampicillin order buy ampicillin sale erythromycin 250mg cheap
buy sildenafil generic methocarbamol for sale online order methocarbamol for sale
sildenafil 50mg us oral aurogra 100mg order estradiol generic
order lamictal 200mg generic order generic lamictal 200mg tretinoin cream over the counter
tadalafil 10mg without prescription brand tadalafil 10mg voltaren over the counter
buy indomethacin 75mg pills cefixime 200mg usa trimox for sale online
tadalafil us cialis capsules 10 pfizer viagra 50mg
acheter 40mg cialis cialis gГ©nГ©rique sildenafil 100mg generique en pharmacie
doxycycline order online buy furosemide 40mg without prescription purchase furosemide generic
clonidine 0.1mg brand order catapres 0.1mg generic buy spiriva 9mcg online
order terazosin 5mg online terazosin brand order azulfidine 500mg generic
buy alendronate 70mg online cheap paracetamol 500mg for sale famotidine without prescription
isosorbide order buy isosorbide pill oral telmisartan 80mg
buy zyban 150mg for sale brand strattera seroquel oral
imuran 100mcg without prescription viagra 100mg pills for sale order sildenafil 50mg without prescription
purchasing cialis on the internet cialis overnight shipping usa buy sildenafil 50mg online cheap
buy cialis 10mg pills order tadalafil generic amantadine ca
isotretinoin online order order generic isotretinoin 40mg order deltasone 40mg online
azithromycin 500mg drug zithromax 500mg brand order neurontin 100mg sale
furosemide sale hydroxychloroquine ca cheap hydroxychloroquine 400mg
chloroquine 250mg sale chloroquine 250mg for sale baricitinib 2mg cheap
buy sporanox pills buy tinidazole online cheap buy tindamax sale
metformin 1000mg for sale cost cialis 40mg order tadalafil pills
order norvasc online cheap viagra 100mg uk cialis 5mg cheap
clozapine 50mg for sale dexamethasone for sale online order generic dexamethasone
sildenafil canada buy lisinopril 10mg sale lisinopril 2.5mg us
prilosec generic real money casino games online slots
writing dissertation service legal online blackjack real money blackjack
purchase clomiphene sale clomiphene drug online card games
cialis tadalafil order tadalafil 20mg online viagra sildenafil 150mg
buy triamcinolone online clarinex 5mg without prescription order clarinex 5mg pill
cialis pharmacy viagra 100mg oral viagra order
orlistat 60mg cheap zovirax 400mg price buy acyclovir online cheap
cost cialis 40mg inderal 10mg oral clopidogrel 75mg pills
methotrexate 5mg pill order reglan 20mg without prescription buy metoclopramide generic
cheap lioresal toradol cost buy ketorolac
buy viagra 100mg for sale purchase viagra pill cheap cialis 10mg
cefuroxime price bimatoprost online buy order robaxin 500mg generic
buy desyrel 50mg pill order aurogra 100mg pills brand aurogra 50mg
buy term papers online term papers writing ivermectin uk
sildenafil 100mg price cost sildalis buy lamictal 200mg for sale
sildenafil india sildenafil 50mg pills cialis 20mg for sale
free spins no deposit casino free samples of ed pills buy cialis 20mg sale
real casino games poker online cash buy provigil 200mg for sale
order lasix lasix 40mg brand purchase plaquenil without prescription
buy sildenafil 100mg without prescription purchase budesonide sale order budesonide sale
buy prednisone 40mg sale order minipress 2mg pill order vermox 100mg generic
buy retin generic tadalis for sale online avana brand
tadacip cheap order generic indocin 75mg buy indomethacin online
buy proventil 100mcg pill cost cipro 1000mg ciprofloxacin online order
buy tiotropium bromide 9mcg generic order tiotropium bromide pills terazosin 1mg cheap
cialis tadalafil 20mg order generic cialis 5mg order cialis 10mg
ivermectin medicine symmetrel 100mg canada dapsone 100 mg price
cheap adalat 10mg nifedipine 30mg brand allegra 120mg cost
order altace 10mg generic arcoxia 120mg us etoricoxib online order
order doxycycline online order doxycycline 100mg cleocin oral
help write my paper azulfidine 500mg drug order sulfasalazine 500 mg without prescription
purchase temovate cheap cordarone generic cordarone 100mg
coreg online amitriptyline 10mg ca order elavil 50mg pills
buy priligy 60mg for sale order avanafil 200mg sale brand motilium
After all, what a great site and informative posts, I will upload inbound link – bookmark this web site? Regards, Reader. Metropol Halı Karaca Halı Öztekin ve Selçuklu Halı Cami Halısı ve Cami Halıları Türkiye’nin En Büyük Cami Halısı Fabrikasıyız…
Thank you for great information. Hello Administ . Metropol Halı Karaca Halı Öztekin ve Selçuklu Halı Cami Halısı ve Cami Halıları Türkiye’nin En Büyük Cami Halısı Fabrikasıyız…
purchase indocin capsule order cenforce 50mg pills buy cenforce pills
order pamelor for sale buy pamelor 25mg pills buy paxil generic
generic pepcid 40mg remeron 30mg canada generic remeron
ropinirole 1mg cost requip online trandate 100mg ca
nexium 20mg usa esomeprazole 20mg uk order lasix
I really love to read such an excellent article. Helpful article. Hello Administ . Metropol Halı Karaca Halı Öztekin ve Selçuklu Halı Cami Halısı ve Cami Halıları Türkiye’nin En Büyük Cami Halısı Fabrikasıyız…
minocycline 50mg for sale gabapentin pills hytrin 1mg over the counter
Everything is very open and very clear explanation of issues. was truly information. Onwin , Onwin Giriş , Onwin Güncel Giriş , Onwin Yeni Adres , onwin
order provigil 200mg for sale provigil cheap promethazine order online
order generic clomid 50mg lipitor 20mg for sale prednisolone sale
prednisone 10mg drug buy amoxil buy amoxicillin 1000mg online cheap
cost isotretinoin 10mg ampicillin 250mg drug buy generic ampicillin 250mg
brand sildenafil pregabalin 150mg cost buy finasteride 1mg
stromectol pills canada brand stromectol deltasone 20mg us
buy isotretinoin 10mg without prescription order azithromycin 250mg buy azithromycin 250mg without prescription
cost ventolin inhalator albuterol 2mg pills purchase amoxiclav