1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

please help me

Discussion in 'PHP' started by angelinasout, Mar 13, 2010.

  1. #1
    hello my friends, my name is angelina, this is my first posting, I am interested in creating a php program where the program can check whois, PR, search engine position with a key word, position in bing and yahoo.

    is there that can help me, what should I do?, whether this requires google API?

    please help me ..
    I was confused how to start, please help from the master php programming.

    sorry if this question is that questions have been asked.
     
    angelinasout, Mar 13, 2010 IP
  2. Silver89

    Silver89 Notable Member

    Messages:
    2,243
    Likes Received:
    72
    Best Answers:
    0
    Trophy Points:
    205
    #2
    This is quite a lot of code, maybe it would be easier to make a php program to get the results from tools that already do this?
     
    Silver89, Mar 13, 2010 IP
  3. angelinasout

    angelinasout Peon

    Messages:
    27
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Can you explain to one part only, for example him how to make a program using php know whois data?
     
    angelinasout, Mar 13, 2010 IP
  4. Silver89

    Silver89 Notable Member

    Messages:
    2,243
    Likes Received:
    72
    Best Answers:
    0
    Trophy Points:
    205
    #4
    You would have to use curl to post the domain into the form of a site that offers whois service or insert it into a url if you can do that and the collect the result data and display it.
     
    Silver89, Mar 13, 2010 IP
  5. weathor

    weathor Peon

    Messages:
    148
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    search engine position could make an iframe and get it with _GET from it..
     
    weathor, Mar 13, 2010 IP
  6. LittleJonSupportSite

    LittleJonSupportSite Peon

    Messages:
    386
    Likes Received:
    20
    Best Answers:
    0
    Trophy Points:
    0
    #6
    This should get you started:



    
    <?php 
    
    function domain_check($domain) { 
    
    $data = 'http://'.$domain; 
    
    // Create a curl handle to a non-existing location 
    $ch = curl_init($data); 
    
    // Execute 
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); 
    curl_exec($ch); 
    
    // Check if any error occured 
    if(curl_errno($ch)) 
    { 
        return '<span style="color:#22c922">The domain is available!</span>'; 
    } else { 
        return '<span style="color:#c92222">The domain is not available</span>'; 
    } 
    
    // Close handle 
    curl_close($ch); 
    } 
    
    // Usage: 
    if(isset($_POST['domain'])) { 
     echo domain_check($_POST['domain'].$_POST['tld']); 
    } 
    
    ?> 
    
    <form method="POST" action=""> 
    http:// <input type="text" name="domain"> 
    <select name="tld"> 
    <option value=".com">.com</option> 
    <option value=".net">.net</option> 
    <option value=".biz">.biz</option> 
    </option> 
    <input type="submit" value="Check"> 
    </form>
    
    Code (markup):
     
    LittleJonSupportSite, Mar 13, 2010 IP
  7. Om ji Kesharwani

    Om ji Kesharwani Peon

    Messages:
    211
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Thanks LittleJonSupportSite.
    I checked for some other tlds it works.

    Is it work for all tlds?
     
    Om ji Kesharwani, Mar 13, 2010 IP
  8. danx10

    danx10 Peon

    Messages:
    1,179
    Likes Received:
    44
    Best Answers:
    2
    Trophy Points:
    0
    #8
    Yes it does. - Since its not refering to any specific tld within the function (just the form - which I believe is only listing the most popular tld's).
     
    danx10, Mar 14, 2010 IP
  9. Bohra

    Bohra Prominent Member

    Messages:
    12,573
    Likes Received:
    537
    Best Answers:
    0
    Trophy Points:
    310
    #9
    Bohra, Mar 14, 2010 IP
  10. angelinasout

    angelinasout Peon

    Messages:
    27
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #10
    Thanks LittleJonSupportSite.

    i will try this script, and if I have problems, still may I ask on this beloved forum?
     
    angelinasout, Mar 14, 2010 IP