SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    Non-Member
    Join Date
    Nov 2010
    Posts
    220
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    convert the code php to Ajax or jQuery? (reciprocal link checker)

    How to convert the code below to Ajax or jQuery?
    Ajax or jQuery as the existence of links be investigated. => reciprocal link checker Ajax or jQuery validation.
    PHP Code:
            $ch curl_init();
            
    curl_setopt($chCURLOPT_URL'http://www.zigweb.ir');
            
    curl_setopt($chCURLOPT_RETURNTRANSFER1);
            
    $contents curl_exec($ch);
            
    curl_close($ch);
            
    $string str_replace('/''\/'$ural);
            
    $link "/$string/si";
            if(
    preg_match($link$contents)) {
                echo 
    "yes";
            } else
            echo 
    "no";
            } 

  2. #2
    SitePoint Member
    Join Date
    Jan 2010
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You can't really CONVERT it to jQuery or Ajax, but you can use it along with jQuery and Ajax.
    Certified Web Ninja

  3. #3
    Non-Member
    Join Date
    Nov 2010
    Posts
    220
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Please explain further.
    How is this?

  4. #4
    SitePoint Member
    Join Date
    Jan 2010
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You can use that in conjunction with jQuery's ajax functions.

    http://api.jquery.com/jQuery.ajax/
    Certified Web Ninja

  5. #5
    Non-Member
    Join Date
    Nov 2010
    Posts
    220
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    But I saw that is ajax and PHP together to use.
    How is this?

  6. #6
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,729
    Mentioned
    104 Post(s)
    Tagged
    4 Thread(s)
    Quote Originally Posted by binboy View Post
    But I saw that is ajax and PHP together to use.
    How is this?
    You know when you visit a web page (perhaps a php web page) and you see the results in your web browser?

    Well AJAX visits similar web pages and receives the result as data. There's no magic to it.
    Programming Group Advisor
    Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
    Car is to Carpet as Java is to JavaScript


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •