i counldn 039 agree't agree m...

当前位置:
>>>--- Can I have a look at your photos, please?---______.A.S..
--- Can I have a look at your photos, please?---______.A.Sure, here you areB.Don’t mention itC.I can’t agree with youD.I’m sorry to hear that
题型:单选题难度:中档来源:不详
A试题分析:句意:——请问,我能看一下你的照片吗?——当然可以,给你。A. Sure, here you are 当然可以,给你。B.Don’t mention it 别提了; C. I can’t agree with you&我不可能同意你的观点 ;D. I’m sorry to hear that听到这,我很抱歉。Can I......?这是委婉的请求,希望得到对方的肯定回答。如果同意就说,Sure, 或Yes。如果不同意,就说I’m afraid you can’t。故选A。
马上分享给同学
据魔方格专家权威分析,试题“--- Can I have a look at your photos, please?---______.A.S..”主要考查你对&&日常用语、谚语,情景交际&&等考点的理解。关于这些考点的“档案”如下:
现在没空?点击收藏,以后再看。
因为篇幅有限,只列出部分考点,详细请访问。
日常用语、谚语情景交际
日常用语:就是日常生活中的交际用语,如Thank you. Sorry.等谚语:即是人们生活中常用的现成的话。谚语类似成语,但口语性强,通俗易懂,而且一般都表达一个完整的意思,形式上差不多都是一两个短句。例如:Helaughsbestwholaughslast.谁笑到最后,谁就笑得最好。&&&&&&&&&& &Nopains,nogains.没有付出,就没有收获。英语日常交际用语分类:打招呼与告别用语(Greeting and Saying Good-bye)1.-How are you ?&&&&&&& -I’m fine, thanks.2. -Nice to meet you.&&&& -Nice to meet you, too.
谈论颜色(Talking about colour)1. -What colour is& it?&&&& -It’s red.2. -What’s you favourite colour, Jenny?&&&&&& -My favourite colour is blue.3. -How many colours do you like?&&&&&&&&& -Three.
谈论高度(Talking about height)1. -Are you short or tall?&&&&&&&&&&&&&&& -I’m short/tall.2. -How tall am I, Mr Wood?&&&&&&&&&&&& -You’re 1.6 metres tall.
看病用语(Seeing a doctor)1. -What’s the matter?&&&&&&&&&&&&&&&&&& -I cut my knee. It hurts.
就餐用语(Having meals)1. -Would you like some dumpling?&&&&&&&&&&&& -No, thanks./ Yes please.2. I’d like porridge for breakfast.&&&&&&&& 3. It’s /Thery’re delicious.4. What would you like for supper?5. -Are you ready to order?&&&&&&&&&&&&&&&&&&&& -Yes, please. I’d like…….
谈论天气(Talking about weather)1 -How is the weather today?/ What’s the weather like today?-It’ sunny rainy snowy windy.2. -Is it snowy?&&&&&&&&&&&&&&&&&&&&&& - No , it’s hot today.3. -what’s the temperature?&&&&&&&&&&&&& - It’s 0 degrees.4. -Is it rainy?&&&&&&&&&&&&&&&&&&&&&&&&& -Yes, it’s rainy.5 It’s warm and windy in spring.6. -How’s the weather today, Steven?&&&&&&&& -It’s cold and snowy.7.-What’s the temperature outside, Kim?&&&&&& -It’s minus fifteen degress.8.What’s the temperature today? Is it warm or hot?9.It’s very cold\ hot today, isn’t it?10. It ‘s a cold day!11. what a cold day!&&&&&&&&&&&&&&& 12. It’s getting warmer.
谈论时间和日期(Talking about time and date)1. -What time is it?/What’s the time?&&&&&& -It’s 7:00 a quarter to seven ten past seven.2. -What day is it?&&&&&&&&&&&&&&&&&&&&&&&&&& -It’s Tuesday.3. -What’s the date?&&&&&&&&&&&&&&&&&&&&&&&&& -It’s October 30.
谈论年龄(Talking about age)1. -How old are you? What’s your age?&&&&&&&&& - I’m fourteen years old.2. She is very young.
谈论购物(Talking about shopping )1.-May I help you ?/What can I do for you?&&& -I would like/want to buy a pencil, please.2. -How much is this are they?&&&&&&&&&&&&&&& -Three yuan.3. I’ll take it.&&&&&&&&&&&&&&&&&& 4. Here’s your change.5. What colour kind would you like?&&&& 6. What about this one?7.I’m looking for a birthday present for my friend.8.Do you have any other sizes/ kinds?
谈论距离(Talking about distance)1. How far is it from China to Canada?&&&&&&&&&&& It’s about 8,500 kilometres.2. Beijing is far from our city.3. -How far is Beijing from here?&&&&&& -It’s about 7,000 kilometres miles away.
请求允许(Asking for permission)1. May I have some donuts, please?2. -May I have some grapes?&&&& -Sorry. We don’t have any grapes. But we have some pears.3. -what would you like, Mom?&&&&& -I would like a bowl of noodles.
指路(Showing the way)-Excuse me. Does the hotel have a computer?-Yes! I can show you. Go straight down this hall. Here it is!
道别用语(Saying good-bye)-Okay. See you later!&&&&&&&&&&&&&&&& -See you later!
表扬与鼓励(Praise and encouragement)1.The gift is wonderful!&&&&&&&&&&& 2. You can do it.3.These chopsticks are beautiful!&&&& 4.Beijing is great!5.Very good!&&&&&&&&&&&&&&&&&&&& 6. Good work!7.Well done! / Wonderful! /Excellent!&&& 8.You speak English very well!9.Keep trying!&&&&&&&&&&&&&&& 10.You dress is beautiful!<e on!
谈论节日和季节(Talking about festivals and seasons)1. -What’s your favourtite festival /season?&&&&&&&&&&&& - My favourite festival is Children’s Day. _My favourite seasons is fall are spring and winter.2. I like Teachers’ Day.3.I like winter because I like to ski and skate.&&&& 4.Spring in China is usually warm.5. There’re four seasons in a year.初中常用谚语:He is not fit to command others that cannot command himself.正人先正己。
He knows most who speaks least.大智若愚。
He who does not advance loses ground.逆水行舟,不进则退。
If you make yourself an ass, don't complain if people ride you.人善被人欺,马善被人骑。If you want knowledge, you must toil for it.要想求知,就得吃苦。
Industry is the parent of success.勤奋是成功之母。
It is better to die when life is a disgrace.宁为玉碎,不为瓦全。
It is easy to open a shop but hard to keep it always open.创业容易守业难。
It is hard to please all.众口难调。
It is never too old to learn.活到老,学到老。
It is no use crying over spilt milk.覆水难收。
It is the first step that costs troublesome.万事开头难。
It is the unforeseen that always happens.天有不测风云,人有旦夕祸福。
It is too late to grieve when the chance is past.坐失良机,后悔已迟。
It never rains but it pours.不鸣则已,一鸣惊人。 It takes three generations to make a gentleman.十年树木,百年树人。
Jack of all trades and master of none.门门精通,样样稀松。
Judge not from appearances.人不可貌相,海不可斗量。
Justice has long arms.天网恢恢,疏而不漏。
Keep good men company and you shall be of the number.近朱者赤,近墨者黑。
Kill two birds with one stone.一箭双雕。
Kings go mad, and the people suffer for it.君王发狂,百姓遭殃。
Kings have long arms.普天之下,莫非王土。
Knowledge is power.知识就是力量。
Knowledge makes humble, ignorance makes proud.博学使人谦逊,无知使人骄傲。 初中英语作文常用的谚语:1.Practice makes perfect. 熟能生巧。2.God helps those who help themselves. 天助自助者。3.Easier said than done. 说起来容易做起来难。4.Where there is a will,there is a way. 有志者事竟成。5.One false step will make a great difference. 失之毫厘,谬之千里。6.Slow and steady wins the race. 稳扎稳打无往而不胜。7.A fall into the pit,a gain in your wit. 吃一堑,长一智。8.Experience is the mother of wisdom. 实践出真知。9.All work and no play makes jack a dull boy. 只工作不玩耍,聪明孩子也变傻。10.Beauty without virtue is a rose without fragrance.无德之美犹如没有香味的玫瑰,徒有其表。11.More hasty,less speed. 欲速则不达。12.Its never too old to learn. 活到老,学到老。13.All that glitters is not gold. 闪光的未必都是金子。14.A journey of a thousand miles begins with a single step.千里之行始于足下。15.Look before you leap. 三思而后行。16.Rome was not built in a day. 伟业非一日之功。17.Great minds think alike. 英雄所见略同。18.well begun,half done. 好的开始等于成功的一半。19.It is hard to please all. 众口难调。20.Out of sight,out of mind. 眼不见,心不念。21.Facts speak plainer than words. 事实胜于雄辩。22.Call back white and white back. 颠倒黑白。23.First things first. 凡事有轻重缓急。24.Ill news travels fast. 坏事传千里。25.A friend in need is a friend indeed. 患难见真情。26.live not to eat,but eat to live. 活着不是为了吃饭,吃饭为了活着。27.Action speaks louder than words. 行动胜过语言。28.East or west,home is the best. 金窝银窝不如自家草窝。29.Its not the gay coat that makes the gentleman. 君子在德不在衣。30.Beauty will buy no beef. 漂亮不能当饭吃。31.Like and like make good friends. 趣味相投。32.The older, the wiser. 姜是老的辣。33.Do as Romans do in Rome. 入乡随俗。34.An idle youth,a needy age. 少壮不努力,老大徒伤悲。35.As the tree,so the fruit. 种瓜得瓜,种豆得豆。36.To live is to learn,to learnistobetterlive.活着为了学习,学习为了更好的活着。37. Where there is a will, there is a way. 有志者事竟成。38. Nothing is too difficult in the world if you set your mind into it. 世上无难事,只怕有心人。39. Every coin has two sides. 每枚硬币都有两面;凡事皆有好坏。40. Don‘t troubles trouble until trouble troubles you. 不要自找麻烦。41. No pains,no gains. 不劳无获情景交际:也叫口语应用,试题根据对话的基本形式是一问一答的特点,通过提供一定的语境,将语言放在交际的实际情景中去考查。它所涉及的内容多是初中英语课本中出现过的与学生学习、生活相联系、实用性强的内容。它既考查特定交际场合使用的表达方式,也通过语境考查词汇和语法知识的运用。情景交际题注意事项:1.所补全的对话内容必须能使上、下文连贯一致,因而必须瞻前顾后、全盘考虑,不能仅看上一个问句就选择答句,或仅根据下文中的答句就补全它的问句,否则容易造成逻辑错误。 2. 做题前应注意试题前面是否有中文或英语的背景提示。这些背景提示是确定话题内容的重要依据,不可疏忽带过。 3. 在选择过程中考生应注意把已选出的选项划去,避免重复选择的错误。 4. 做题时要先易后难,一时难以确定不要勉强先做,否则易造成连锁错误。 &解题思路与技巧:1. 通览全文,领会大意,揣摩话题。解题时应先跳过空格通览全文,了解对话大意,根据对大意的把握,判定语境,揣摩话题。&2. 根据语境,细读选项,选择答案。在把握话题和语境的基础上,针对对话的每一空白处,细读所提供的选项,认真分析它们之间的异同,依据对话有关情景内容,选择正确的答案。&3.通盘考虑,前后联想,先易后难。要从对话整体理解出发,依照上、下问答的逻辑顺序来考虑所选择的答案,不可不顾前后顺序,孤立地就上句就补下句,这样可能出现所补句子符合上文而不符合下文的情况。要先解决有把握的、容易的,再回头补选较难的。&4.通读对话,义形结合,验证答案。将对话补全之后,再将整段对话通读一遍,逐一验证答案。所选的答案不仅语义上要符合语境,而且要保证语言正确,做到说话得体。&&&&
发现相似题
与“--- Can I have a look at your photos, please?---______.A.S..”考查相似的试题有:
25262129685922949116475391338246014"---Go for a picnic this weekend, OK? ---- ______. I love getting close to nature. A.I couldn’t agree moreB.I’m afraid not.C.I believe notD.I don’t think s..."答案_完形填空_英语阅读网
最新公告:
&&没有公告
您现在的位置:&&>>&&>>&&>>&正文
"---Go for a picnic this weekend, OK? ---- ______. I love getting close to nature. A.I couldn’t agree moreB.I’m afraid not.C.I believe notD.I don’t think s..."答案
&&&&&&&&&&
"---Go for a picnic this weekend, OK? ---- ______. I love getting close to nature. A.I couldn’t agree moreB.I’m afraid not.C.I believe notD.I don’t think s..."答案
作者:佚名
文章来源:
更新时间:
---Go for a picnic this weekend, OK? ---- ______. I love getting close to nature. A.I couldn’t agree moreB.I’m afraid not.C.I believe notD.I don’t think so.
参考答案:
A考查交际用语. A. 我完全同意B. 恐怕不行C.我相信没有D.我不这样认为.根据题意,周末去野餐,好吗?结合下文,我喜欢接近大自然。故选A最符合语境。
高中录入:admin&&&&责任编辑:admin&
上一篇高中: 下一篇高中:
【字体: 】【】【】【】【】【】
  网友评论:(只显示最新10条。评论内容只代表网友观点,与本站立场无关!)几道高一英语题目1.Broadly speaking, I would agree with Shirley,though not___.A.entirely
B.extremely
B为什么不可以,可以翻译成不是极其同意2.everyone doesn&#39;t agree to the plan,someone support it while I&#39;m one of
those who opposed it .为什_百度作业帮
几道高一英语题目1.Broadly speaking, I would agree with Shirley,though not___.A.entirely
B.extremely
B为什么不可以,可以翻译成不是极其同意2.everyone doesn't agree to the plan,someone support it while I'm one of
those who opposed it .为什
1.Broadly speaking, I would agree with Shirley,though not___.A.entirely
B.extremely
B为什么不可以,可以翻译成不是极其同意2.everyone doesn't agree to the plan,someone support it while I'm one of
those who opposed it .为什么不能用one of who opposed it
可以认为 who opposed it 是宾语从句啊,为什么不呢?
1.只能说不是“完全同意”,不能说不是“极其同意”,这在中文中也是病句.2.这里没有宾语从句,只有定语从句.one of those 其中之一;who opposed it 是一个定语从句,修饰those.Keyboard Shortcuts?
Next menu item
Previous menu item
Previous man page
Next man page
Scroll to bottom
Scroll to top
Goto homepage
Goto search(current page)
Focus search box
Change language:
Brazilian Portuguese
Chinese (Simplified)
gethostbyname
gethostbyname &
Get the IPv4 address corresponding to a given Internet host name
Description
string gethostbyname
( string $hostname
Parameters
The host name.
Return Values
Returns the IPv4 address or a string containing the unmodified
hostname on failure.
Example #1 A simple gethostbyname() example
&?php$ip&=&gethostbyname('');echo&$ip;?&
- Get the Internet host name corresponding to a given IP address
- Get a list of IPv4 addresses corresponding to a given Internet host
- Converts a human readable IP address to its packed in_addr representation
- Converts a packed internet address to a human readable representation
Important note: You should avoid its use in production.DNS Resolution may take from 0.5 to 4 seconds, and during this time your script is NOT being executed.Your customers may think that the server is slow, but actually it is just waiting for the DNS resolution response.You can use it, but if you want performance, you should avoid it, or schedule it to some CRON script...
If you do a gethostbyname() and there is no trailing dot after a domainname that does not resolve, this domainname will ultimately be appended to the server-FQDN by nslookup.So if you do a lookup for nonexistentdomainname.be your server may return the ip for nonexistentdomainname., which is the server-ip.To avoid this behaviour, just add a trailing d i.e. gethostbyname('nonexistentdomainname.be.')
Better yet:&?php$ip = rtrim(`/usr/bin/dig $host A +short`);?&
&?php$nametotest = "";& & $time_start = getmicrotime();& & testipaddress($nametotest);& & $time_end = getmicrotime();& & $time = $time_end - $time_start;& & echo "Good Host Search took $time seconds&br&&br&";$nametotest = "";& & $time_start = getmicrotime();& & testipaddress($nametotest);& & $time_end = getmicrotime();& & $time = $time_end - $time_start;& & echo "Bad Host Search took $time seconds&br&";& & & & function getmicrotime(){ & & list($usec, $sec) = explode(" ",microtime()); & & return ((float)$usec + (float)$sec); & & } function testipaddress ($nametotest) {& & $ipaddress = $nametotest;& & $ipaddress = gethostbyname($nametotest);& & if ($ipaddress == $nametotest) {& & & & echo "No ip address for host&br&";& & }& & else {& & & & echo "good hostname, $nametotest ipaddress = $ipaddress&br&";& & }}?&
This function says "Returns the IPv4 address or a string containing the unmodified hostname on failure.This isn't entirely true, any hostname with a null byte in it will only return the characters BEFORE the null byte.&?php$hostname = "foo\0bar";var_dump($hostname );var_dump(gethostbyname($hostname ));?&Results:string 'foo?bar' (length=7)string 'foo' (length=3)
For doing basic RBL (Real Time Blacklist) lookups with this function do:&?php$host = '64.53.200.156';$rbl& = 'sbl-xbl.spamhaus.org';$rev = array_reverse(explode('.', $host));$lookup = implode('.', $rev) . '.' . $rbl;if ($lookup != gethostbyname($lookup)) {& & echo "ip: $host is listed in $rbl\n";} else {& & echo "ip: $host NOT listed in $rbl\n";}?&Tomas V.V.Cox
This logic solution to problem checking dns reverse name resolution:&?php$ip = gethostbyname($host);if(ip2long($ip) == -1 || ($ip == gethostbyaddr($ip) && preg_match("/.*\.[a-zA-Z]{2,3}$/",$host) == 0) ) {& & echo 'Error, incorrect host or ip';& & }else {& & echo 'Ok';}?&
gethostbyname and gethostbynamel does not ask for AAAA records. I have written two functions to implement this. gethostbyname6 and gethostbynamel6. I don't believe this issue has been addressed yet.They are made to replace gethostbyname[l], in a way that if $try_a is true, if it fails to get AAAA records it will fall back on trying to get A records.Feel free to correct any errors, I realise that it is asking for *both* A and AAAA records, so this means two DNS calls.. probably would be more efficient if it checked $try_a before making the query, but this works for me so I'll leave that up to someone else to implement in their own work.. the tip is out there now anyway..Here is the code:& & function gethostbyname6($host, $try_a = false) {& & & & // get AAAA record for $host& & & & // if $try_a is true, if AAAA fails, it tries for A& & & & // the first match found is returned& & & & // otherwise returns false& & & & $dns = gethostbynamel6($host, $try_a);& & & & if ($dns == false) { }& & & & else { return $dns[0]; }& & }& & function gethostbynamel6($host, $try_a = false) {& & & & // get AAAA records for $host,& & & & // if $try_a is true, if AAAA fails, it tries for A& & & & // results are returned in an array of ips found matching type& & & & // otherwise returns false& & & & $dns6 = dns_get_record($host, DNS_AAAA);& & & & if ($try_a == true) {& & & & & & $dns4 = dns_get_record($host, DNS_A);& & & & & & $dns = array_merge($dns4, $dns6);& & & & }& & & & else { $dns = $dns6; }& & & & $ip6 = array();& & & & $ip4 = array();& & & & foreach ($dns as $record) {& & & & & & if ($record["type"] == "A") {& & & & & & & & $ip4[] = $record["ip"];& & & & & & }& & & & & & if ($record["type"] == "AAAA") {& & & & & & & & $ip6[] = $record["ipv6"];& & & & & & }& & & & }& & & & if (count($ip6) & 1) {& & & & & & if ($try_a == true) {& & & & & & & & if (count($ip4) & 1) {& & & & & & & & & && & & & & & & & }& & & & & & & & else {& & & & & & & & & & return $ip4;& & & & & & & & }& & & & & & }& & & & & & else {& & & & & & & && & & & & & }& & & & }& & & & else {& & & & & & return $ip6;& & & & }& & }
mmucklo raises a valid point, however the function to use would be getmxrr() in the simplest case, or alternatively checkdnsrr() getdnsrr() does not exist.On another note, it can be a pain (when iterating with while loops for example) that on failure gethostbyname() returns the hostname, rather than FALSE. You could wrap it in a simple user function, to "correct" this:&?phpfunction fixed_gethostbyname ($host) {& & $ip = gethostbyname($host);& & if ($ip != $host) { return $ip; } else return false;}?&
One note about using gethostbyname() for checking email address domains:If the name doesn't resolve, follow up with getdnsrr() and make sure they don't have an MX entry before returning an error.It is possible for a domain name not to have an A record, but still have an MX entry.
Just a heads up. I was using this function on my site to verify email host addresses. I thought all was good, until a potential client contacted me and said they couldn't sign up correctly. They have a valid email address and domain, but this function failed. Good luck.
On a side-note, PHP (5.0.4, but probably other versions too) can cache gethostbyname information.In short, once PHP looks up an address, it may not actually perform another lookup as you may expect. In my particular case (I think) the problem was a change to resolv.conf didn't take effect inside PHP (although nslookup/ping etc worked fine). Stop/Starting Apache fixed it (although a simple 'restart' (kill -HUP) didn't).In short, if you change resolv.conf, stop and restart Apache.
Function returns boolean:&?phpfunction isDomainResolves($domain){& && return gethostbyname($domain) != $domain;}?&
I was using file_get_contents on a set of URLs. Some of them URLs were invalid (the structure of it was ok but the DNS hosts couldn't resolve them) and I kept getting an annoying warning. I wanted to check the DNS somehow but existing check dns function in php doesn't have one for windows and the one a person supplied there does not work 100% of the time.Instead use this function to try to resolve a host. This won't throw any warnings, you just need to check the output. You'll get the same warnings with fopen and fsockopen.
Note that if you pass an IP address to gethostbyname() it will return that IP address.
The dns entries get cached, whether they exist or not.& Expect really good response times after the first one.
I had difficulty getting gethostbyname to work under OpenBSD 3.2 and Apache, until I discovered that the default Apache chroot caused the problem.To get PHP's gethostbyname to work, you need resolv.conf (and possibly hosts) in /var/www/etc (assuming default install dirs).
If name resolution fails with apache2, mod_chroot and php5, addLoadFile /lib/libnss_dns.so.2to the mod_chroot config.
referring to ralphbolton at mail2sexy dot com comment:(at least in 5.2.0 + djbdns-dnscache) gethostbyname does not really seem to cache entries. If somebody notices a speed-up after the second lookup of the same domain - that's most likely your dns-cache itself, not some php-internal dns-cache.It does cache the entries in your /etc/resolv.conf (e.g. what dns to use) so I agree with him, that stopping and starting apache, will reload the resolv.conf.
When using PHP and Apache in a chroot environment on RedHat Linux, I have found that I need to bind-mount /var/run/nscd to get this to work. Apparently, the socket in that directory is needed for all the DNS things.
One way to discover your IP address automatically:&?php$myIP = gethostbyname(trim(`hostname`));echo $myIP;?&
In PHP4 you can use gethostbyname() but I have found this unreliable when doing lookups on entries that return A records on the private network. PHP5 has a much better routine -- dns_get_record(). If you are stuck with PHP4 or don't want to upgrade you can use dig:&?php$ip = `/usr/bin/dig $host A +short`;?&
&?php$nametotest = "";& & testipaddress($nametotest);$nametotest = "";testipaddress($nametotest);& & function testipaddress ($nametotest) {& & $ipaddress = $nametotest;& & $ipaddress = gethostbyname($nametotest);& & if ($ipaddress == $nametotest) {& & & & echo "No ip address for host, so host "& & & & & && . "not currently available in DNS and "& & & & & && . "probably offline for some time&BR&";& & }& & else {& & & & echo "good hostname, ipaddress = $ipaddress&BR&";& & }}?&
Grabbing IPs for multiple hosts:&?phpfunction getAddrByHost($hosts, $timeout = 3) {& $returnString = '';& foreach ($hosts as $host) {& & $query = `nslookup -timeout=$timeout -retry=1 $host`;& & if (preg_match('/\nAddress: (.*)\n/', $query, $matches))& & & $returnString .= trim($matches[1]) . '&br&';& & $returnString .= $host . '&br&';& }& return $returnString;}$hostArray[] = '';$hostArray[] = '';$returnString = getAddrByHost($hostArray);echo $returnString;?&
I put this in a prepend script for all my websites to cut down the amount of abuse by automated scripts.&?PHP& & & & $blacklists = array('web.sorbs.net');& & & & $parts& = explode('.', $_SERVER['REMOTE_ADDR']);& & & & $ip& && = implode('.', array_reverse($parts)) . '.';& & & & foreach($blacklists as $bl) {& & & & & & & & $check = $ip . $bl;& & & & & & & & if ($check != gethostbyname($check)) {& & & & & & & & & & & & & & & & error_log('PHP Security: [DNSBL] - ' . $_SERVER['REMOTE_ADDR'] . ' - ' . $bl);& & & & & & & & & & & & & & & & die('Put a detailed error here so the client knows why they have been blocked');& & & & & & & & }& & & & }?&
This is the best method I've come up with to resolve any host-name to ip-address, it's quick and reliable and has support for timeout! An invalid address, a unicode string for exmaple, returns after 4~ seconds, instead of 8~ with gethostbyname! It works only with unix though.&?phpfunction getAddrByHost($host, $timeout = 3) {&& $query = `nslookup -timeout=$timeout -retry=1 $host`;&& if(preg_match('/\nAddress: (.*)\n/', $query, $matches))& & & return trim($matches[1]);&& return $host;}?&

我要回帖

更多关于 t039.417.16.037.00 的文章

 

随机推荐