unexpected T_ECHO plz help

Discussion in 'PHP' started by saudshah, Dec 9, 2010.

  1. #1
    I'm having this error:

    Parse error: syntax error, unexpected T_ECHO in /home/jinii/public_html/**********/index.php on line 34

    <? Php
    echo "<h2> SQL Google Priv9 Scanner </ h2>";  <<< line 34
    echo "<form action='' method='post'>";
    echo "<b> Dork </ b>: <p> <input type = 'text' name = 'dork' value = 'inurlhp? = id + site: am '> </ p> ";
    echo "<input type='submit' value='Search'>";
    echo "<hr> <br />";
    
    
    PHP:

     
    saudshah, Dec 9, 2010 IP
  2. drctaccess

    drctaccess Peon

    Messages:
    62
    Likes Received:
    1
    Best Answers:
    1
    Trophy Points:
    0
    #2
    
    <?php
    echo "<h2> SQL Google Priv9 Scanner </ h2>";
    echo "<form action='' method='post'>";
    echo "<b> Dork </ b>: <p> <input type = 'text' name = 'dork' value = 'inurlhp? = id + site: am '> </ p> ";
    echo "<input type='submit' value='Search'>";
    echo "<hr> <br />";
    
    Code (markup):
    this code works... if you still have error on line 34 .. the error comes from the line/lines above

    I hope this helps
     
    drctaccess, Dec 9, 2010 IP
  3. saudshah

    saudshah Peon

    Messages:
    58
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    after replacing your code i am having this error:

    Parse error: syntax error, unexpected T_STRING, expecting T_VARIABLE or '$' in /home/jinii/public_html/*****/index.php on line 40


    now my whole coding is this:

    <?php
    echo "<h2> SQL Google Priv9 Scanner </ h2>";
    echo "<form action='' method='post'>";
    echo "<b> Dork </ b>: <p> <input type = 'text' name = 'dork' value = 'inurlhp? = id + site: am '> </ p> ";
    echo "<input type='submit' value='Search'>";
    echo "<hr> <br />";
    
    if ($ _POST ['dork']) (
    
    @ Set_time_limit (0);
    @ Error_reporting (0);
    @ Ignore_user_abort (true);
    ini_set ('memory_limit', '128M ')
    
    $ Google = "& q = REPLA CE_DORK http://www.google.com/cse?cx=013269018370076798483 3Awdba3dlnxqm% & num = 100 & hl = en & as_qdr = all & start = REPLACE_STA RT & sa = N";
    
    $ I = 0;
    $ A = 0;
    $ B = 0;
    
    while ($ b <= 900) (
    $ A = 0;
    flush (); ob_flush ();
    echo "Pages: [$ b] <br />";
    echo "Dork: [<b>". $ _POST ['dork']."</ b>] <br /> ";
    echo "Getting result from google ... <br />";
    flush (); ob_flush ();
    
    if (preg_match ("/ note match any ******** did s /", connect_host (str_replace (array ("REPLACE_DORK", "REPLACE_START"), array ("".$_ POST ['dork']. "", "$ b"), $ google)), $ val)) (
    echo "No result found <br />";
    flush (); ob_flush ();
    break;
    )
    
    preg_match_all ("/ <h2 class=(.*?)> <a href=\"(.*?)\" class=(.*?)> /", connect_host (str_replace (array ("REPLACE_DORK", "REPLACE_START "), array ("".$_ POST ['dork'].""," $ b "), $ google)), $ sites);
    echo "Scanning ... <br />";
    flush (); ob_flush ();
    while (1) (
    
    if (preg_match ("/ You have an error in your SQL | Division by zero in | supplied argument is not a valid MySQL result resource in | Call to a member function | Microsoft JET Database | ODBC Microsoft Access Driver | Microsoft OLE DB Provider for SQL Server | Unclosed quotation mark | Microsoft OLE DB Provider for Oracle | Incorrect syntax near the | SQL query failed / ", connect_host (str_replace ("=", "='", $ sites [2] [$ a ])))) (
    echo "<a href='".Clean(str_replace("=", "='", $sites[2][$a]))."' target='_blank' class='effectok'>". str_replace ("=", "='", $ sites [2] [$ a ])."</ a> <== <font color='green'> SQL Injection Yes (: </ font> <br /> ";
    Else ()
    echo "<a href='".Clean(str_replace("=", "='", $sites[2][$a]))."' target='_blank' class='effectfalse'>". str_replace ("=", "='", $ sites [2] [$ a ])."</ a> <== None <font color='red'> SQL Injection </ Font> <br /> ";
    flush (); ob_flush ();
    )
    if ($ a> count ($ sites [2]) -2) (
    echo "Done <br />";
    break;
    )
    $ A = $ a +1;
    )
    $ B = $ b +100;
    )
    )
    
    connect_host function ($ url) (
    $ Ch = curl_init ();
    curl_setopt ($ ch, CURLOPT_FOLLOW ********, 0);
    curl_setopt ($ ch, CURLOPT_HEADER, 1);
    curl_setopt ($ ch, CURLOPT_URL, $ url);
    curl_setopt ($ ch, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt ($ ch, CURLOPT_TIMEOUT, 30);
    $ Data = curl_exec ($ ch);
    if ($ data) (
    return $ data;
    Else ()
    return 0;
    )
    )
    
    function Clean ($ text) (
    return htmlspecialchars ($ text, ENT_QUOTES);
    )
    
    ?>
    
    PHP:
     
    saudshah, Dec 9, 2010 IP
  4. MyVodaFone

    MyVodaFone Well-Known Member

    Messages:
    1,048
    Likes Received:
    42
    Best Answers:
    10
    Trophy Points:
    195
    #4
    Why have you got spaces after $ eliminate the spaces and run your code again

    Like

    $ I = 0; - $I = 0;
    $_ POST - $_POST
     
    MyVodaFone, Dec 9, 2010 IP
  5. drctaccess

    drctaccess Peon

    Messages:
    62
    Likes Received:
    1
    Best Answers:
    1
    Trophy Points:
    0
    #5
    Better use { instead of ( in your code in if function while etc areas
     
    drctaccess, Dec 9, 2010 IP
  6. saudshah

    saudshah Peon

    Messages:
    58
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Parse error: syntax error, unexpected T_STRING, expecting T_VARIABLE or '$' in /home/jinii/public_html/*****/index.php on line 40


    i have removed all the spaces after $ ie. $ I $ A $ B
     
    saudshah, Dec 9, 2010 IP
  7. drctaccess

    drctaccess Peon

    Messages:
    62
    Likes Received:
    1
    Best Answers:
    1
    Trophy Points:
    0
    #7
    use this code:
    
    <?php
    echo "<h2> SQL Google Priv9 Scanner </ h2>";
    echo "<form action='' method='post'>";
    echo "<b> Dork </ b>: <p> <input type = 'text' name = 'dork' value = 'inurlhp? = id + site: am '> </ p> ";
    echo "<input type='submit' value='Search'>";
    echo "<hr> <br />";
    
    if($_POST['dork'])
    {
            @set_time_limit (0);
            @error_reporting (0);
            @ignore_user_abort (true);
            ini_set('memory_limit', '128M ');
            $Google = "& q = REPLA CE_DORK http://www.google.com/cse?cx=013269018370076798483 3Awdba3dlnxqm% & num = 100 & hl = en & as_qdr = all & start = REPLACE_STA RT & sa = N";
            $i = 0;
            $a = 0;
            $b = 0;
            while ($b <= 900){
                    $a = 0;
                    flush (); ob_flush ();
                    echo "Pages: [$b] <br />";
                    echo "Dork: [<b>". $_POST['dork']."</ b>] <br /> ";
                    echo "Getting result from google ... <br />";
                    flush (); ob_flush ();
    
                    if (preg_match ("/ note match any ******** did s /", connect_host (str_replace (array ("REPLACE_DORK", "REPLACE_START"), array ("".$_POST ['dork']. "", "$b"), $google)), $val))
                    {
                            echo "No result found <br />";
                            flush (); ob_flush ();
                            break;
                    }
                    preg_match_all ("/ <h2 class=(.*?)> <a href=\"(.*?)\" class=(.*?)> /", connect_host(str_replace(array("REPLACE_DORK", "REPLACE_START "), array("".$_POST['dork'].""," $b "), $google)), $sites);
                    echo "Scanning ... <br />";
                    flush (); ob_flush ();
                    while (1)
                    {
                            if (preg_match ("/ You have an error in your SQL | Division by zero in | supplied argument is not a valid MySQL result resource in | Call to a member function | Microsoft JET Database | ODBC Microsoft Access Driver | Microsoft OLE DB  Provider for SQL Server | Unclosed quotation mark | Microsoft OLE DB Provider for Oracle | Incorrect syntax near the | SQL query failed / ", connect_host (str_replace ("=", "='", $sites[2][$a]))))
                            {
                                    echo "<a href='".Clean(str_replace("=", "='", $sites[2][$a]))."' target='_blank' class='effectok'>".str_replace ("=", "='", $sites[2][$a])."</ a> <== <font color='green'> SQL Injection Yes (: </ font> <br /> ";
                            }
                            else
                            {
                                    echo "<a href='".Clean(str_replace("=", "='", $sites[2][$a]))."' target='_blank' class='effectfalse'>".str_replace ("=", "='", $sites[2][$a])."</ a> <== None <font color='red'> SQL Injection </ Font> <br /> ";
                                    flush (); ob_flush ();
                            }
                            if($a > count($sites[2])-2)
                            {
                                    echo "Done <br />";
                                    break;
                            }
                            $a = $a +1;
                    }
                    $b = $b +100;
            }
    }
    
    function connect_host($url)
    {
            $Ch = curl_init();
            curl_setopt ($ch, CURLOPT_FOLLOW, 0);
            curl_setopt ($ch, CURLOPT_HEADER, 1);
            curl_setopt ($ch, CURLOPT_URL, $url);
            curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
            curl_setopt ($ch, CURLOPT_TIMEOUT, 30);
            $data = curl_exec($ch);
            if ($data)
            {
                    return $data;
            }
            else
            {
                    return 0;
            }
    }
    
    function Clean($text)
    {
            return htmlspecialchars($text, ENT_QUOTES);
    }
    
    ?>
    
    Code (markup):
    at least it is error free.... but I don;t think this code will ever work - looks like a code generated by an automated software from some kind of javascript to php converter
     
    drctaccess, Dec 9, 2010 IP
  8. drctaccess

    drctaccess Peon

    Messages:
    62
    Likes Received:
    1
    Best Answers:
    1
    Trophy Points:
    0
    #8
    this line
    
    $Google = "& q = REPLA CE_DORK http://www.google.com/cse?cx=013269018370076798483 3Awdba3dlnxqm% & num = 100 & hl = en & as_qdr = all & start = REPLACE_STA RT & sa = N";
    
    Code (markup):
    should be
    
    $Google = "&q=REPLACE_DORKhttp://www.google.com/cse?cx=0132690183700767984833Awdba3dlnxqm%&num=100&hl=en&as_qdr=all&start=REPLACE_START&sa=N";
    
    Code (markup):
    and so on
     
    drctaccess, Dec 9, 2010 IP
  9. saudshah

    saudshah Peon

    Messages:
    58
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #9
    i have replace your code and now getting this error:

    Parse error: syntax error, unexpected T_ECHO in /home/jinii/public_html/******/index.php on line 34

    now my current coding is this:

    <? Php
    echo "<h2> SQL Google Priv9 Scanner </ h2>";    <<<< THIS IS THE LINE 34
    echo "<form action='' method='post'>";
    echo "<b> Dork </ b>: <p> <input type = 'text' name = 'dork' value = 'inurlhp? = id + site: am '> </ p> ";
    echo "<input type='submit' value='Search'>";
    echo "<hr> <br />";
    
    if ($ _POST ['dork']) (
    
    @ Set_time_limit (0);
    @ Error_reporting (0);
    @ Ignore_user_abort (true);
    ini_set ('memory_limit', '128M ')
    
    $Google = "&q=REPLACE_DORKhttp://www.google.com/cse?cx=0132690183700767984833Awdba3dlnxqm%&num=100&hl=en&as_qdr=all&start=REPLACE_START&sa=N";
    
    $ I = 0;
    $ A = 0;
    $ B = 0;
    
    while ($ b <= 900) (
    $ A = 0;
    flush (); ob_flush ();
    echo "Pages: [$ b] <br />";
    echo "Dork: [<b>". $ _POST ['dork']."</ b>] <br /> ";
    echo "Getting result from google ... <br />";
    flush (); ob_flush ();
    
    if (preg_match ("/ note match any ******** did s /", connect_host (str_replace (array ("REPLACE_DORK", "REPLACE_START"), array ("".$_ POST ['dork']. "", "$ b"), $ google)), $ val)) (
    echo "No result found <br />";
    flush (); ob_flush ();
    break;
    )
    
    preg_match_all ("/ <h2 class=(.*?)> <a href=\"(.*?)\" class=(.*?)> /", connect_host (str_replace (array ("REPLACE_DORK", "REPLACE_START "), array ("".$_ POST ['dork'].""," $ b "), $ google)), $ sites);
    echo "Scanning ... <br />";
    flush (); ob_flush ();
    while (1) (
    
    if (preg_match ("/ You have an error in your SQL | Division by zero in | supplied argument is not a valid MySQL result resource in | Call to a member function | Microsoft JET Database | ODBC Microsoft Access Driver | Microsoft OLE DB Provider for SQL Server | Unclosed quotation mark | Microsoft OLE DB Provider for Oracle | Incorrect syntax near the | SQL query failed / ", connect_host (str_replace ("=", "='", $ sites [2] [$ a ])))) (
    echo "<a href='".Clean(str_replace("=", "='", $sites[2][$a]))."' target='_blank' class='effectok'>". str_replace ("=", "='", $ sites [2] [$ a ])."</ a> <== <font color='green'> SQL Injection Yes (: </ font> <br /> ";
    Else ()
    echo "<a href='".Clean(str_replace("=", "='", $sites[2][$a]))."' target='_blank' class='effectfalse'>". str_replace ("=", "='", $ sites [2] [$ a ])."</ a> <== None <font color='red'> SQL Injection </ Font> <br /> ";
    flush (); ob_flush ();
    )
    if ($ a> count ($ sites [2]) -2) (
    echo "Done <br />";
    break;
    )
    $ A = $ a +1;
    )
    $ B = $ b +100;
    )
    )
    
    connect_host function ($ url) (
    $ Ch = curl_init ();
    curl_setopt ($ ch, CURLOPT_FOLLOW ********, 0);
    curl_setopt ($ ch, CURLOPT_HEADER, 1);
    curl_setopt ($ ch, CURLOPT_URL, $ url);
    curl_setopt ($ ch, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt ($ ch, CURLOPT_TIMEOUT, 30);
    $ Data = curl_exec ($ ch);
    if ($ data) (
    return $ data;
    Else ()
    return 0;
    )
    )
    
    function Clean ($ text) (
    return htmlspecialchars ($ text, ENT_QUOTES);
    )
    
    ?>
    
    PHP:
     
    saudshah, Dec 9, 2010 IP
  10. drctaccess

    drctaccess Peon

    Messages:
    62
    Likes Received:
    1
    Best Answers:
    1
    Trophy Points:
    0
    #10
    oh boy... use the code I posted on PREVIOUS POST before the one you already quoted... the one which starts with this line: "use this code:"
     
    drctaccess, Dec 9, 2010 IP
  11. drctaccess

    drctaccess Peon

    Messages:
    62
    Likes Received:
    1
    Best Answers:
    1
    Trophy Points:
    0
    #11
    where did you get this code from? it is the worst code I've ever saw in my entire life of web developer
     
    drctaccess, Dec 9, 2010 IP