手机浏览 RSS 2.0 订阅 膘叔的简单人生 , 腾讯云RDS购买 | 超便宜的Vultr , 注册 | 登陆
浏览模式: 标准 | 列表2024年09月的文章

学着写PHP飞信

飞信,对于我们搞开发的人来说,确实还是需要的。网上也有一些php飞信的类(看的也很累),不过,我看的是zendstudio.net,因为看起来好象方便。
自从上次飞信改过IP地址后,我才真正的仔细看过这方面的东西(其实也只是稍看看啦。。。哈哈)

其实,说真的,飞信这东西,PHP版的在我眼里感觉很深奥,因为要抓包,以前还从来没有这样抓过,总觉得是一件很复杂很难的事情。但自从不能给好友发短信后,我到Zendstudio.net上看过别人回复后,才发现他根本就没有提供。所以就萌发了要自己的写的念头。

于是找了smartsniff这个抓包工具,找来libfetion,关掉我所有的上网的程序。然后运行他开始抓包。
发现真的很方便。。。
于是就准备开始写了。不用fsockopen,而准备直接采用curl。。。目前刚刚写了一个getSIPC,发现速度好象是比fsockopen的速度快很多。【可能是因为,zendstudio.net他是按字节读取,然后用正则处理获得sipcproxy,而我是直接取回来用simplexml_loadstring,然后直接输出这个对象的值 ?也或许只是一个感觉而己,其实并没有变化?晚上回去输出执行时间看一下就知道了。HOHO】

慢慢写,因为注意过给好友发短信的功能,是利用SID的,但普通情况下,获取不到SID,必须得先把好友拉回来做一个缓存。这样就可以了。所以本版飞信应该不会公开,否则,谁也不敢使用。【随便说说,还没写完呢。。。。】

Tags: 飞信, fetion, php

最近一些想做和正在做的事的记录

快过年了。一些在做和想做的事情需要记录一下了

1、kenai.com要关门了。sbPHP没有地方放源码了。只能天天晚上更新了,不过正好又准备重写一下,所以问题不大,影响也小

2、kkread.com,原来想做小说站的。现在改成代码快读,专门用来研究php,js以及wordpress。等数据多一点后,考虑的是提供整合下载,代码压缩等。

3、mzditu.com,是一直想做的,但没有时间做的。在playgoogle.com上也看到一些操作google map的代码,但却一直没有动手过。。。

4、wordpress学习以及插件研究一下。毕竟,我不是纯粹用来玩的。

5、想好好读读优秀代码,想好好看看书

6、学python,NS团队的hihiyou在博客上贴了点用python做的编辑器,吸引了我。。。

7、想好好看看JS,多写一些jQuery插件。

kenai.com即将关闭

说起kenai,那其实是要说很多很多东西的,比如说,netbeans整合了它,比如说他现在属于oracle了,比如说他是一个开源代码库,类似于Sf.net等。

但是,今天上午收到一封邮件说,kenai.com即将关闭了,不再为开源代码库提供服务了。

邮件主题很简单:The Closure of Project Kenai。

邮件内容也很简单:

XML/HTML代码
  1. It's with a sad heart that we have to announce that the Kenai.com domain will be shutdown as part of the consolidation of project hosting sites now that Sun is a wholly owned subsidiary of Oracle.  
  2.   
  3. Project Kenai has always existed as two different things: Kenai the infrastructure, and Kenai the website (Kenai.com).  While it has come time to close the domain of Kenai.com, the infrastructure (which is already used under NetBeans.org) will live on to support other domains in the future.  
然后就是告诉我,该准备一下往其他源代码服务器上迁移,并且提示我可以用subversion等工具把代码拷贝出来。否则。。。唉。

可怜我的sbphp就是放在kenai上面的现在,是全完了。不过反正我也准备重写了,倒也无所谓,只是又少了一个源代码迁入的地方。看来netbeans也需要更新了。期待再次整合一个网站。

Tags: kenai, sbphp

jQuery操作select

jQuery这个框架方便了我们对于HTML元素的操作,本来以为自己对于Select操作也算是熟悉了,但上午在测试的时候才发现自己了解的还真不多。

看了一下jQuery的一些方法后,理出了一些常用的方法,列在下面:

JavaScript代码
  1. //获取第一个option的值  
  2. $('#test option:first').val();  
  3. //最后一个option的值   
  4. $('#test option:last').val();  
  5. //获取第二个option的值  
  6. $('#test option:eq(1)').val();  
  7. //获取选中的值  
  8. $('#test').val();  
  9. $('#test option:selected').val();  
  10. //设置值为2的option为选中状态  
  11. $('#test').attr('value','2');  
  12. //设置第一个option为选中  
  13. $('#test option:last').attr('selected','selected');  
  14. $("#test").attr('value' , $('#test option:last').val());  
  15. $("#test").attr('value' , $('#test option').eq($('#test option').length - 1).val());  
  16. //获取select的长度  
  17. $('#test option').length;  
  18. //添加一个option  
  19. $("#test").append("<option value='9'>ff</option>");  
  20. $("<option value='9'>ff</option>").appendTo("#test");  
  21. //添除选中项  
  22. $('#test option:selected').remove();  
  23. //指定项选中  
  24. $('#test option:first').remove();  
  25. //指定值被删除  
  26. $('#test option').each(function(){  
  27.     if( $(this).val() == '5'){  
  28.         $(this).remove();  
  29.     }  
  30. });  
  31. $('#test option[value=5]').remove();  
  32.   
  33. //获取第一个Group的标签  
  34. $('#test optgroup:eq(0)').attr('label');  
  35. //获取第二group下面第一个option的值   
  36. $('#test optgroup:eq(1) :option:eq(0)').val();  

 

 想来应该够用了吧?呵呵

 

Tags: jquery, select

sexy button

对于非美工来说,做一个漂亮的button是件很痛苦的事情。当然,对于一位美工,即使是做个好一点的button,想来也不会太简单。你可以看看这里。。

或许你认为这样的BUTTON很简单:

大小: 9.46 K
尺寸: 295 x 85
浏览: 1444 次
点击打开新窗口浏览全图

这样自定义图标的呢?

大小: 2.72 K
尺寸: 198 x 45
浏览: 1474 次
点击打开新窗口浏览全图

那么,这样的呢?

大小: 4.59 K
尺寸: 262 x 51
浏览: 1643 次
点击打开新窗口浏览全图

如果上面都简单,那么还有这么多的样式呢,你认为怎么样?

大小: 40.96 K
尺寸: 290 x 376
浏览: 1437 次
点击打开新窗口浏览全图

觉得不错的话。到这里看看:http://sexybuttons.googlecode.com/svn/tags/1.0/index.html

如果觉得真不错,那么到:http://code.google.com/p/sexybuttons/下载吧。一些小图片加上CSS,不需要再利用js做圆角了。看看作者怎么说?

 

XML/HTML代码
  1. Sexy Buttons is a HTML/CSS-based framework for creating beautiful web site buttons. These stylish, attention getting buttons can be used for calls to action wherever user interaction is desired. Compare Sexy Buttons with the standard browser buttons:  
  2.   
  3. The framework is focused on being simple yet flexible and strives to be as easy to implement as possible.  
  4. Button Features  
  5.   
  6.     * The underlying HTML can use either <button> or <a> elements.  
  7.     * They are dynamic and shrink/expand to fit their text labels.  
  8.     * There are three states: normal, hover, and active.  
  9.     * The labels can include icons. Use one of the 1000+ included Silk icons or use your own. Icons are specified via HTML class attribute.  
  10.     * They use the sliding doors CSS technique for increased performance.  
  11.     * They support different skins by simply changing an HTML class attribute.  
  12.     * A layered Photoshop template is provided to assist in creating new skins.  
  13.     * Easy to implement.  
  14.     * No Javascript required.   

这些可是支持所有浏览器的哦