Jump to content

CaTaLinU

Members
  • Posts

    17
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

CaTaLinU's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. I have done this code , and it works perfectly with little bugs ... if i set to read the lines from 0 to 20 , on the page it shows that lines but if i set to show the lines from 20 to 40 , it shows the lines from 0 to 20 on page ... that is the bug or the error... or if i set to 40 to 80 it shows the lines from 0 to 40 because 80 - 40 = 40 40 - 20 = 20 .... $handle = fopen("file.txt", "r"); $lenght_parameter = "9999999"; $ic = 20; $ic_max = 40; // stops after this number of rows while (!feof($handle) && ++$ic<=$ic_max) { $buffer = fgets($handle, $lenght_parameter); echo $buffer."<br>"; } fclose($handle);
  2. just to show what is between line x and y from a file.txt
  3. Can someone help me with some code that will shows what is between row x and y with ftp functions from a file and from a diferent host with connection with user and password to that external host ... ? Thx ..
  4. i have continut.php?info=(1,2,3) <?php $info = $_GET['info']; if($info == "1") { ?> Text 1 <? } if($info == "2") { ?> Text 2 <? } ?> and in index.php i want to add an include or something onmouseover or onclick that in don't wnat to refresh the whole page, i want to be refreshed just continut.php?info to the value 1,2 or 3 what i have choosed on onmouseover...
  5. it is posible to make something like this? <a href="" onclick="refresh('index.php?info=1');"/>Index 1</a> <a href="" onclick="refresh('index.php?info=2');"/>Index 1</a> <a href="" onclick="refresh('index.php?info=3');"/>Index 3</a> and what code do i need to autorealod the index.php?info=(1,2,3) in my Index.php (simple php file with index.php?info=(1,2,3) include) ?
  6. so with that exemple it won't work right? Other script exists?
  7. I tried to do something like createimagefrompng and then to add some texts <?php header('Content-Type: image/gif'); $newimg = imagecreatetruecolor( 450, 95 ) or die ( 'GD Library not available atm.' ); $cs = ImageCreateFromgif("boobs.gif"); $color_white = imagecolorallocate($newimg, 255, 255, 255); imagettftext($cs,10,0,5,14,$color_white,"fonts/font_captcha.ttf","TextLeft"); imagettftext($cs,7,0,190,14,$color_white,"fonts/font_captcha.ttf","TextRight"); imagegif($cs); imagedestroy($cs); ?> Can someone help me with something like this ? I want that the gif image what would result in the php file to be animated , and on it to add some texts! Thanx for help !
  8. sorry for double , but someone can help me please ?
  9. it depends on what script it works phpbb , smf,mybb,etc ... each script has a diferit database
  10. <? header("Content-type: image/png"); // ---------------------------------------------------------+ - +--------------------------------------------------------- \\ include ('config.php'); // ---------------------------------------------------------+ - +--------------------------------------------------------- \\ $img = imagecreatefrompng("imagine.png"); $culoare_alb = imagecolorallocate($img,255,255,255); $culoare_rosu = imagecolorallocate($img,255,0,0); $culoare_albastru = imagecolorallocate($img,27,27,224); $culoare_verde = imagecolorallocate($img,37,224,27); $username = $_GET['p']; // ---------------------------------------------------------+ - +--------------------------------------------------------- \\ if(isset($_GET['p'])) { $username = $_GET['p']; $respect = FTP_pini_Get($username.".ini",'Respect',$host,$user,$password,$path); $level = FTP_pini_Get($username.".ini",'Level',$host,$user,$password,$path); $sex = FTP_pini_Get($username.".ini",'Sex',$host,$user,$password,$path); $origin = FTP_pini_Get($username.".ini",'Origin',$host,$user,$password,$path); $leader = FTP_pini_Get($username.".ini",'Leader',$host,$user,$password,$path); $member = FTP_pini_Get($username.".ini",'Member',$host,$user,$password,$path); $age = FTP_pini_Get($username.".ini",'Age',$host,$user,$password,$path); $deaths = FTP_pini_Get($username.".ini",'Deaths',$host,$user,$password,$path); $admin = FTP_pini_Get($username.".ini",'AdminLevel',$host,$user,$password,$path); $paycheck = FTP_pini_Get($username.".ini",'Paycheck',$host,$user,$password,$path); $ore = FTP_pini_Get($username.".ini",'ConnectedTime',$host,$user,$password,$path); $helper = FTP_pini_Get($username.".ini",'Helper',$host,$user,$password,$path); $vip = FTP_pini_Get($username.".ini",'VipLevel',$host,$user,$password,$path); $money = FTP_pini_Get($username.".ini",'Money',$host,$user,$password,$path); $bank = FTP_pini_Get($username.".ini",'Bank',$host,$user,$password,$path); $crimes = FTP_pini_Get($username.".ini",'Crimes',$host,$user,$password,$path); $phone = FTP_pini_Get($username.".ini",'PhoneNr',$host,$user,$password,$path); $car = FTP_pini_Get($username.".ini",'Car',$host,$user,$password,$path); $car2 = FTP_pini_Get($username.".ini",'Car2',$host,$user,$password,$path); $car3 = FTP_pini_Get($username.".ini",'Car3',$host,$user,$password,$path); if($respect != '') { imagestring($img,5,2,77,"GameStatus.In",$culoare_albastru); imagestring($img,5,170,77,"-",$culoare_rosu); imagestring($img,5,185,77,"XXXXXXX",$culoare_verde); // ----------+ - +---------- \\ imagestring($img,3,105,2,"TEXT1",$culoare_alb); // ----------+ - +---------- \\ imagestring($img,3,105,17,"TEXT2",$culoare_alb); // ----------+ - +---------- \\ imagestring($img,3,105,32,"TEXT3",$culoare_alb); // ----------+ - +---------- \\ imagestring($img,3,105,47,"TEXT4",$culoare_alb); // ----------+ - +---------- \\ imagestring($img,3,105,62,"TEXT5",$culoare_alb); // ---------------------------------------------------------+ - +--------------------------------------------------------- \\ imagestring($img,3,185,2,"{$age}",$culoare_rosu); // ----------+ - +---------- \\ imagestring($img,3,220,17,''.$_GET['p'].'',$culoare_rosu); // ----------+ - +---------- \\ imagestring($img,3,235,32,"",$culoare_rosu); // ----------+ - +---------- \\ imagestring($img,3,215,47,"",$culoare_rosu); // ----------+ - +---------- \\ } else { imagestring($img,3,150,3,"that player doesn't exist",$culoare_rosu); } } else if(!isset($_GET['p'])) { imagestring($img,3,150,3,"no player selected",$culoare_rosu); } else { imagestring($img,3,150,3,"Error ...",$culoare_rosu); } // ---------------------------------------------------------+ - +--------------------------------------------------------- \\ imagepng($img); imagedestroy($img); // ---------------------------------------------------------+ - +--------------------------------------------------------- \\ ?> gamestatus.in/samp/imagine.php?p=r0bert -> it doesn't show anything but if i go to gamestatus.in/samp/imagine.php?n=r0bert -> it says that i havent selected a player
  11. <?php //Directorul unde sa caute $director = /Users'; //Un filtru pentru extensie $extensie = 'ini'; //Logare FTP $server_ftp = '93.'; $utilizator_ftp = 'x@yahoo.com'; $parola_ftp = 'x'; $conexiune = ftp_connect($server_ftp); ftp_login($conexiune,$utilizator_ftp,$parola_ftp) or die('Logarea FTP a esuat!'); //Setam pe pasiv ftp_pasv($conexiune,true); //Cream lista $fisiere = array(); $fisiere = raw_list('$director'); //Printam rezultatele $i=0; $count=count($fisiere); while($i < $count); print ''.$fisiere[$id].''; $i++; ftp_close($conexiune); endwhile; //Functia raw_list function raw_list($folder) { Global $conexiune; Global $extensie; Global $fisiere; $exntesii = explode(",", $extensie); $list = ftp_rawlist($conexiune, $folder); $anzlist = count($list); $i = 0; while ($i < $anzlist): $split = preg_split("/[\s]+/", $list[$i], 9, PREG_SPLIT_NO_EMPTY); $ItemName = $split[8]; $endung = strtolower(substr(strrchr($ItemName,"."),1)); $path = "$folder/$ItemName"; if (substr($list[$i],0,1) === "d" AND substr($ItemName,0,1) != "."): raw_list($path); elseif (substr($ItemName,0,2) != "._" AND in_array($endung,$extensii)): array_push($files, $path); endif; $i++; endwhile; return $files; } ?> Parse error: syntax error, unexpected T_ENDWHILE in xxxxxxx/vs/conturi.php on line 28
  12. sorry, but in ftp im beginner can you help me with the correct php code please ?
  13. Deci eu am asa config.php code: <?php error_reporting(0); $host = "93.xx.xx.xx"; $user = 'X@google.xxx'; $password = 'password'; $path = '/direcotry'; ?> apoi code: <?php include ('config.php'); $ftp_connection = @ftp_connect($host); @ftp_login($ftp_connection, $user, $password); $parent = substr($path, 0, strrpos($path, "/")); if (glob($path . "*.ini") != false) { $filecount = count(glob($path . "*.ini")); echo $filecount; } else { echo 0; } ftp_close($ftp_connection); ?> it should count the files with the extension .ini But always on the page shows 0 Please Help..
×
×
  • 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.