User Profile

Collapse

Profile Sidebar

Collapse
xNephilimx
xNephilimx
Last Activity: Jan 12 '12, 10:46 PM
Joined: Jun 21 '07
Location: Buenos Aires, Argentina
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • Are you trying to make some kind of web proxy? If so, there are quite a few around, like PHProxy http://www.phproxy.org/ (source code: http://sourceforge.net/projects/poxy/).
    There's no need to reinvent the wheel.

    Best regards
    See more | Go to post

    Leave a comment:


  • xNephilimx
    replied to how to pass PHP array to javascript
    in PHP
    you could also use json_encode function if you have php 5.2+

    Code:
    echo json_encode( $php_array );
    The output will be the same as dormilich method.
    Be aware that in javascript there are no associative arrays like in php (arrays with string keys instead of numbers), so json_encode will encode such array as an object.
    See more | Go to post

    Leave a comment:


  • You can use Math.max() to find the max number like:

    [CODE=javascript]
    max = eval("Math.max( "+pt.join(',')+ ")");
    [/CODE]
    See more | Go to post

    Leave a comment:


  • xNephilimx
    replied to HTML5 database queries
    The code krishnaneeraja provided is from palm webOS, I don't think that will work in a regular browser.
    See more | Go to post

    Leave a comment:


  • xNephilimx
    replied to HTML5 database queries
    In HTML5 it can, but I don't know if browsers had implemented this API yet, I haven't tried it either. Anyways, from what I've read, the dbs are stored on the client side only, what seems logical, since a client side connection to a remote db is terribly insecure.
    If you want to store data locally on the client's browser but want to use something better, with more granular lever of control, and more persistent than cookies, you can use DOM...
    See more | Go to post

    Leave a comment:


  • Great, thanks for the info!
    I thought about iframes too, but but that's like a doing CSRF to your own site... lol.
    Maybe saving certain user data, like a hash of ip+browser+some thing else server-side (plus a timeout of some sort?), so you can compare if the session id request came from the same user, but that won't make it 100% sure that is the same user.

    In the company I work, this is done for a couple of sites we own, but...
    See more | Go to post

    Leave a comment:


  • same as acoder, the problem is the padding for sure, a button will always accommodate it's with according to the text, unless you specify a fixed size. You have to be careful about the box model though, in mozila/webkit compatible browsers the padding (and border) is not taken in account in the width, so if the width is 10 and the padding (left and right) is 5 the with will still be 10px but you will see it as if it is 20px wide.
    http://ww...
    See more | Go to post

    Leave a comment:


  • Hi, gregerly.
    Quick thought: you may want to store the sessions in a db that has access from both domains and link the session id with the logged in user, so when the user logs in, you can redirect the user to a remote script on the other site of yours passing the session id in GET, the remote script assigns the session id so all the data will be instantly available for this second domain and then redirect the user back. This will not create...
    See more | Go to post
    Last edited by xNephilimx; Jan 11 '10, 02:23 PM. Reason: typos...

    Leave a comment:


  • xNephilimx
    replied to Modifying .htaccess and RewriteBase
    in PHP
    Nice move! I always recommend the use of virtual hosts, so you can have everything in their own space, it's more organized, and this way you don't have to try to fix the .htaccess

    Kind regards
    See more | Go to post

    Leave a comment:


  • You could also use jQuery, just wrap the xml code in the jquery object and you're ready to query it.

    Best regards
    See more | Go to post

    Leave a comment:


  • xNephilimx
    replied to Modifying .htaccess and RewriteBase
    in PHP
    Hi waqasahmed996.
    If I understand correctly, you run you CI (CodeIgniter) app in http://stampychan (or something to that effect), right? If that's correct, it's like a virtual host.
    Is /Sites/stampychan the web accessible folder? or you have a public_html or htdocs folder inside? if so, put the app inside that one, and keep the .htaccess file in the same level as the CI app index.php file, and leave RewriteBase just with the /
    ...
    See more | Go to post

    Leave a comment:


  • jawwad90020021
    jawwad90020021 posted a Visitor Message for xNephilimx
    import flash.external. ExternalInterfa ce;
    after compile this error occurs

    **Error** Symbol=Menu_But tons, layer=Layer 12, frame=1:Line 1: Syntax error.
    import flash.external. ExternalInterfa ce;

    Total ActionScript Errors: 1 Reported Errors: 1

    please help me
    See more | Go to post

  • This is an old one! haha.
    Remember that you should call the javascript snippet only when the page has fully loaded, window.onload = callback_fn; in pure javascript or $(callback_fn); in jQuery (recommended, since this one executes when just the DOM is fully loaded, the other one waits until everything has loaded).
    I didn't tried this lately, but this could be the answer, If it still doesn't work, I suggest you to install Firebug JS debugger...
    See more | Go to post
    Last edited by xNephilimx; Sep 14 '09, 02:13 PM. Reason: typossssss

    Leave a comment:


  • tellmewhy
    tellmewhy posted a Visitor Message for xNephilimx
    http://bytes.com/topic/flash/answers...pt#post3511896...
    See more | Go to post

  • Other things that sites like that use, are content delivery network (CDN) services, so their site can work seamlessly and fast (almost) wherever the user is, like Akamai or CacheFly.
    I know MySpace uses akamai, in their sites, they have really intresting white papers about social networking sites, a must read if you wan't to learn
    about social networks, although it's a little marketing oriented, it's good to read it.

    A little...
    See more | Go to post

    Leave a comment:


  • xNephilimx
    replied to Firefox Annoyance (keyboard event)
    Take a look at the link gits posted, great resource to compare js frameworks.

    - jQuery can be used commercially, there's no problem about it. http://docs.jquery.com/Licensing

    It's the lightest js framework available.

    They are truly reliable, his foundator (John Resig) is currently working with mozilla org, developing the upcoming js specification and working on the engine too....
    See more | Go to post

    Leave a comment:


  • xNephilimx
    replied to Firefox Annoyance (keyboard event)
    Not at all, jQuery is a really lightweight javascript framework, you can download it packed, so it's really compressed, too. Frameworks like prototype + scriptaculous are kind of heavier, but nothing to worry about. you see, the vast majority of the sites use some javascript framework, and it really doesn't slow them down.
    I use jQuery, because to me, is the smallest one, faster to learn, really flexible, and extensible....
    See more | Go to post

    Leave a comment:


  • yep, you can use wget with system or exect php functions
    See more | Go to post

    Leave a comment:


  • xNephilimx
    replied to Custom title For Popup window
    the document that your re calling for the popup (the one in the url variable) should have the title in it's title tag, that way you'll see the proper title in the popup window.
    See more | Go to post

    Leave a comment:


  • From what you're saying, I guess it's just a matter of changing the event that fires the action. In the original script the do it on submit, you can do it on keyup and if the key is 13 (enter) it will call the proper function.


    Code:
    window.onkeyup = function( e ) {
        if( !e ) var e = window.event;
        var key = e.keyCode ? e.keyCode : e.which;
        
        if( key == 13 ) {
            //do what you have
    ...
    See more | Go to post

    Leave a comment:

No activity results to display
Show More
Working...