User Profile

Collapse

Profile Sidebar

Collapse
ziycon
ziycon
Joined: Sep 8 '08
Location: Ireland
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • ziycon
    started a topic Imagecopy() Issue
    in PHP

    Imagecopy() Issue

    I have the below code, there are no errors and the images is being created but not with the watermark image.

    Can anyone suggest what might be going on here?

    Code:
    private function addWaterMark($fileIn) {
    	$stamp = imagecreatefrompng(WATERMARK_IMG);
    	$im = imagecreatefrompng($fileIn);
    
    	$marge_right = 10;
    	$marge_bottom = 10;
    	$sx = imagesx($stamp);
    	$sy = imagesy($stamp);
    ...
    See more | Go to post

  • ziycon
    started a topic C# mySQL Connection

    C# mySQL Connection

    I'm developing an application in VS2008 using c# and I had a SQLite database work but want to go with mySQL.

    Can anyone point me to the best way to use a mySQL connection with c#, should I use a persistent connection!?

    Thanks in advance.
    See more | Go to post

  • ziycon
    started a topic Jquery function call in jquery loaded data

    Jquery function call in jquery loaded data

    I have data being loaded on a page using the jquery .load() function which calls a php script and is working grand. I have pagination added to the data loaded onto the page but no jquery functions work when I click on the pagination in the data that has been loaded.

    Does this mean that jquery .click() function wont work on data if that data has been loaded by another jquery function and if so is there a way around this?
    See more | Go to post

  • ziycon
    started a topic PHP mySQL resource query?
    in PHP

    PHP mySQL resource query?

    I have this first piece of code which works fine but I'm trying to break it up into two parts like in the second code snippet below.
    Code:
    $tables = mysql_query("SHOW tables;");
    while($row = mysql_fetch_array($tables)) {
    	$tableNames .= "<a href=\"".$_SERVER['PHP_SELF'].">".$row[0]."</a><br/>\n";
    	$tableCount++;
    }
    So it passes the sql query...
    See more | Go to post

  • ziycon
    replied to Adding text to PDF file download
    in PHP
    I've been unable to find the topic your referring to, I've search under your posts/replies and by pdf but unable to find it, any chance you could link me please?
    See more | Go to post

    Leave a comment:


  • ziycon
    replied to Adding text to PDF file download
    in PHP
    Anyone any ideas on how to go about this?
    See more | Go to post

    Leave a comment:


  • ziycon
    replied to Configuration on the php
    in PHP
    Go to http://windows.php.net/download/ and download the Thread Safe version and follow the install steps and it should configure Apache for you.
    See more | Go to post

    Leave a comment:


  • ziycon
    replied to Dependies of a copied table
    It will look for the table that it was referencing the current database so if that table wasn't copied over it wont find it.
    See more | Go to post

    Leave a comment:


  • ziycon
    replied to Adding text to PDF file download
    in PHP
    Its to add to an existing PDF, the above script allows the file to be downloaded but I need to be able to add a disclaimer to files downloaded.
    The best option if possible would be to be able to add a page at the begining of the PDF with the disclaimer info!?
    See more | Go to post

    Leave a comment:


  • ziycon
    started a topic Adding text to PDF file download
    in PHP

    Adding text to PDF file download

    I was wondering if its possible to add text on the fly on a PDF download when using the below code, I've been unable to get it to work, I've tried echoing it and adding it to the var that the files being stored to with no luck, any ideas?
    Code:
    $chunksize = 1*($fileChunkSize);
    $bytes_send = 0;
    if ($file = fopen($file, 'r')) {
    	if(isset($_SERVER['HTTP_RANGE']))
    	fseek($file, $range);
    
    	while(!feof($file)
    ...
    See more | Go to post

  • ziycon
    replied to cURL Issue: prompt user to save file
    in PHP
    I have a script in place that will chunck the file being downloaded into 30mb bits to get around the php.ini size restriction, its seems to be working grand for the past few hours.
    *Fingers crossed*

    Thanks for the help and advice johny10151981.
    See more | Go to post

    Leave a comment:


  • ziycon
    replied to cURL Issue: prompt user to save file
    in PHP
    This code does the job but what affect will/can it have on the memory usage of the server and the limitations of the memory used per script in php.ini?

    For example in php.ini its set to: 'memory_limit = 32M', so I assume this code can't handle a file greater the 32mb!?
    Code:
    $contentType = 'application/pdf';
    $path = 'http://path/to/file/test.pdf';
    
    header("Cache-Control: public");
    header("Content-Description:
    ...
    See more | Go to post

    Leave a comment:


  • ziycon
    replied to cURL Issue: prompt user to save file
    in PHP
    Thanks for your reply johny10151981, the reason I was going for capturing the click was due to readfile() being disabled on my hosting for security reasons and the size of some of the files are 200ish MB so I can't really use a function that reads the file into memory first as the server would most definitly fall over.
    See more | Go to post

    Leave a comment:


  • ziycon
    replied to cURL Issue: prompt user to save file
    in PHP
    Ok, I'm thinking this option wont be the best so here my dilema, I need a user to be able to click a link to download a file but I need to capture that link click to update the database log table to track what registered users download, any ideas to the best wasy to capture this link click?

    I can't store the files in the database and can't use a script to build the file into a downloadable file due to the size of some of the files 100mb...
    See more | Go to post

    Leave a comment:


  • ziycon
    replied to Readfile() replacement cURL?
    in PHP
    Resolved it, http://bytes.com/topic/php/answers/914960-curl-issue.
    See more | Go to post

    Leave a comment:


  • ziycon
    started a topic cURL Issue: prompt user to save file
    in PHP

    cURL Issue: prompt user to save file

    I've have the below code and its works fine, how can I get the file to prompt the user to save it instead of specifying a path on the server to save it?

    I have to use curl due to hosting and memory issues on the hosting.

    Any help much appreciated.
    Code:
    <?php
    $contentType = 'text/plain';
    $file = 'http://mysite.com/test.txt';
    
    $fp = fopen('/path/to/save/mytest.txt', 'w');
    $ch = curl_init($file);
    ...
    See more | Go to post

  • ziycon
    started a topic Readfile() replacement cURL?
    in PHP

    Readfile() replacement cURL?

    I'm unable to use the code snippet below for a file download on a site as readfile is disabled for security reasons, I'm told cURL can be used, any advice on how to change it or on the below replacement would be great, thanks.
    Code:
    header('Content-type: '.$contentType);
    header('Content-Disposition: attachment; filename="'.$filename.'"');
    header('Content-length: '.$filesize);
    readfile($file);
    Is there...
    See more | Go to post

  • ziycon
    replied to FTP Download Directories Recursively
    Anyone have any ideas on where to go next?
    See more | Go to post

    Leave a comment:


  • ziycon
    started a topic FTP Download Directories Recursively

    FTP Download Directories Recursively

    I have a script that will connect and download all the files in the root directory but I need to recursively download all sub-directories and their files, there could be sub-directories in sub-directories to the a maximum of 15 I'd say.

    I know windows native FTP command doesn't support recursive download with mget but can anyone point me to a good script function that will do what I require or even help me out with the code I have already?...
    See more | Go to post

  • ziycon
    replied to str_replace case insensitive issue?
    in PHP
    Nice one Niheel, your help is greatly appreciated.
    See more | Go to post

    Leave a comment:

No activity results to display
Show More
Working...