Jump to content

ShivaGupta

Members
  • Posts

    146
  • Joined

  • Last visited

Posts posted by ShivaGupta

  1. i am working with this

    $ch = curl_init('http://example.com');
      curl_setopt($ch,CURLOPT_FOLLOWLOCATION,true);
      curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);
      curl_exec($ch);
      $url = curl_getinfo($ch, CURLINFO_EFFECTIVE_URL);
      echo $url;
    

    that working fine....

     

     

     if i want to fetch url from other sorce  as

    $turl = "http://example.com";
    $ch = curl_init('$turl');
      curl_setopt($ch,CURLOPT_FOLLOWLOCATION,true);
      curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);
      curl_exec($ch);
      $url = curl_getinfo($ch, CURLINFO_EFFECTIVE_URL);
      echo $url;
    

    then  output like

    HTTP://$turl
    

    i dont understand what is wrong plz help me........

  2.  

    you can use trim

    $user = trim($matches[1], '"');
    

    Or change your regex to only match the text within the quotes

    if ( preg_match('/u":"([a-z0-9_]+)"}/i', $html,$matches) )
    

    with this

    $user = trim($matches[1], '"');
    

    my provlem solved......

    "Thanks a lot"

  3.  

    Where is this 'u":"PB4CwyDzE6FnnqDrnEoEPWIuC9_uWV"}] snippet of code from? You need to make it valid json syntax in order to decode it with json_decode

     

    You can do

    $json = '[{"u":"PB4CwyDzE6FnnqDrnEoEPWIuC9_uWV"}]';
    $data = json_decode($json, true);
    echo $data[0]['u'];
    

    here is my code

    if ( preg_match("/u\"\.*?)}/i", $html,$matches) ) {
    $user = $matches[0];
    echo "<font color=green><b>".$user."</b><br></font>";
    
    } else {
    
        echo "A match was not found.";
    }
    //returned      u":"PB4CwyDzE6FnnqDrnEoEPWIuC9_uWV"}
    //need only     PB4CwyDzE6FnnqDrnEoEPWIuC9_uWV
    
  4.  

    Hi,

     

    I can't find the error in this code:

     

    <?php
    $cat=$_REQUEST['cate'];
    if($cat==1 && $cat==2 && $cat==3 && $cat==4)
    {
    require_once('OrderStatus.php');
    }  
    elseif ($cat==5 && $cat==6)
    {
    require_once('NoVal1.php');
    }
    ?>

     

    Error:Parse error: syntax error, unexpected

     

    What am I doing wrong?

     

     

     

    this is a best option to post code  <>

     

     

    see magic

    <?php
    $cat=$_REQUEST['cate'];
    if($cat==1 && $cat==2 && $cat==3 && $cat==4)
    {
    require_once('OrderStatus.php');
    }  
    elseif ($cat==5 && $cat==6)
    {
    require_once('NoVal1.php');
    }
    ?>
    
  5. congrats... well deserved

     

     

    Wow!!... you see AbraCadaver... your nomination let people without words :shrug:

     

    BTW: congrats... well deserved

    ini_set("display_errors", 0);error_reporting(0); 

  6. I keep getting this error 

    Warning: fopen(img/120300.png): failed to open stream: Permission denied in /var/www/play/playall.php on line 192 Warning: fwrite() expects parameter 1 to be resource, boolean given in /var/www/play/playall.php on line 193 Warning: fclose() expects parameter 1 to be resource, boolean given in /var/www/play/playall.php on line 194 Warning: file_get_contents(img/120300.png): failed to open stream: No such file or directory in /var/www/play/playall.php on line 196 Fatal error: Call to undefined function imagecreatefromstring() in /var/www/play/playall.php on line 197 
    

    with Apache 2 and PHP 5.3 on

    Debian GNU/Linux 6.0 (Squeeze)

  7. i geting Content Encoding Error
          
      The page you are trying to view cannot be shown because it uses an invalid or unsupported form of compression.

     

     

    on go daddy linux shared hosting with php 5.3.....

     

     

    i am working with a curl script that take  10 min to finish their work.    and have many loops .. also i use this  before all echo to  get live output

     for($k = 0; $k < 80000; $k++)
            echo ' '; // extra spaces to fill up browser buffer
    

    most thing that script working fine with another linux hosting..........i have tryed 2 or 3 other hosting their that script working well ..

     

    here is php ini @ go daddy

    output_buffering = Off
    register_globals = off
    allow_url_fopen = on
    ignore_user_abort = On
    allow_url_include = On
    max_execution_time = 3000
    expose_php = Off
    max_input_time = 3000
    memory_limit = 512M
    variables_order = "EGPCS"
    extension_dir = ./
    zlib.output_compression = Off
    implicit_flush = On
    allow_call_time_pass_reference = On
    safe_mode = Off
    safe_mode_gid = Off
    safe_mode_allowed_env_vars = PHP_
    safe_mode_protected_env_vars = LD_LIBRARY_PATH
    upload_tmp_dir = /tmp
    precision = 12
    SMTP = relay-hosting.secureserver.net
    url_rewriter.tags = "a=href,area=href,frame=src,input=src,form=,fieldset="
    
    
    ; Only uncomment zend optimizer lines if your application requires Zend Optimizer support
    
    ;[Zend]
    ;zend_optimizer.optimization_level=15
    ;zend_extension_manager.optimizer=/usr/local/Zend/lib/Optimizer-3.3.3
    ;zend_extension_manager.optimizer_ts=/usr/local/Zend/lib/Optimizer_TS-3.3.3
    zend_extension=/usr/local/Zend/lib/Optimizer-3.3.3/ZendExtensionManager.so
    ;zend_extension_ts=/usr/local/Zend/lib/Optimizer_TS-3.3.3/ZendExtensionManager_TS.so
    
    
    ; -- Be very careful to not to disable a function which might be needed!
    ; -- Uncomment the following lines to increase the security of your PHP site.
    
    ;disable_functions = "highlight_file,ini_alter,ini_restore,openlog,passthru,
    ;    	      phpinfo, exec, system, dl, fsockopen, set_time_limit,
    ;                     popen, proc_open, proc_nice,shell_exec,show_source,symlink"
    
    

    so plz help me...to fix that provlem....

  8. You can transfer your files using SFTP or SCP. On windows a good client to handle this is WinSCP. For other OS's, do some google searching and you'll find a solution.

     

    Beyond just uploading the files though, you need to learn how to actually configure apache so it knows where to find the files, how to process them, etc. This is not something to learn via a simple forum post, you need to google for some tutorials on how to manage a LAMP server.

     

    CPanel is a piece of software that you'd have to buy and install to manage your server. Unless you paid for it when you bought the VPS, it will not be available to you. You'll have to do everything manually via the command line.

    verry verry thanks  sir

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.