User Profile

Collapse

Profile Sidebar

Collapse
tscott
tscott
Last Activity: Aug 19 '07, 09:19 PM
Joined: Jul 18 '07
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • tscott
    replied to Barcode implementation regarding php
    in PHP
    Hey,
    You could make bar like images and assign each as a number gaining width as it goes bigger then when you input a number it will show the barcode by showing a differant image for each number.. this way you can make it fully customized... You could also decrease the size of your old script by finding where the image is create or included... personally I would do this... Then set the reader to select a number with the length of black....
    See more | Go to post

    Leave a comment:


  • Hey,
    Nice Tutorial although I would like to add that this is VERY hard to do for hackers and is not as simple as.
    [html]
    <img src="http://myawesomebank.c om/transfer.php?fr om=1002&to=1004 &amt=100" />
    [/html]

    The only way you can use a PHP file like that is if it is a php generated image. The file itself can't do anything except parse the image otherwise html doesn't process...
    See more | Go to post

    Leave a comment:


  • tscott
    replied to How to do logout alert message ?
    in PHP
    You could always put it on your logout.php and have it confirm, before the initial php logout.
    And do a "<body onload="
    Example:
    [php]
    <?php
    echo "<script>";
    echo "<body onload=confirm_ logout();>";
    //Then logout would go here///
    ?>
    [/php]
    That should work just as good.
    As doing it in the link as it does virtually the same...
    See more | Go to post

    Leave a comment:


  • tscott
    replied to Copy Image
    in PHP
    Hey,
    Try using fopen to open the image then write to it with fwrite.
    Example:
    [php]
    <?php
    $newfilename = 'newfile,jpg';
    $myfile = file_get_conten ts('winter.jpg' );
    $newfile = fopen($newfilen ame , 'w');
    fwrite($newfile , $myfile);
    ?>
    [/php]

    Unless you are transforming the image to something differant which to me it looks like that was not the desired effect.
    See more | Go to post

    Leave a comment:


  • tscott
    replied to Ebedding images in PHP email scripts
    in PHP
    Hey,
    You got the wrong forum.
    ~Tyler
    See more | Go to post

    Leave a comment:


  • tscott
    replied to PHP Include - file of the day
    in PHP
    Hey,
    There alot of ways you could do this. One way would be to make a txt file and seperate each name with a |. Then use a script like this.
    [php]
    <?php
    //Name Rotator//
    $fileofnames = 'names.txt';
    if(file_exists( $fileofnames))
    {
    $namesfile = file_get_conten ts($fileofnames );
    $namesfile = explode('|' , $namesfile);
    $date = date('j');
    $date = $date-1;
    ...
    See more | Go to post
    Last edited by tscott; Jul 22 '07, 12:41 AM. Reason: Making post longer

    Leave a comment:


  • tscott
    replied to i need to play aauudio file
    in PHP
    That would only echo a link to it and not actually play the music though. To do what you want you'd need this.
    Example Here : See Example
    [php]
    <?

    $dir ="songs";

    $dh = opendir($dir);

    while ( !(($file = readdir($dh)) === false) )
    {

    if ($file == "." || $file == "..") continue;

    ...
    See more | Go to post
    Last edited by tscott; Jul 20 '07, 11:02 PM. Reason: fixing it.

    Leave a comment:


  • Hey, Yeah it is on $_POST. Post is defined by the script referring to it so therefore you must redefine the variable so it can be edited.

    For Example:
    $post = $_POST['whatever'];

    Then do

    $post = explode('Sepera tor' , $post);

    Then send it to you query with post instead of $_POST['post'];

    I like your coding style ;).

    ~Tyler
    See more | Go to post

    Leave a comment:


  • tscott
    replied to How to terminate a script
    in PHP
    Hmm... Code looks really disorganized to me and there aren't as many {} as there should be, a while statement was ended with a ; . Yeah... that code = :S

    Needs to be dubugged.

    ~Tyler
    See more | Go to post

    Leave a comment:


  • tscott
    replied to How to find if a URL redirects
    in PHP
    Hey,
    I looked around a bit, Couldn't really find any way. Especially for PHP redirects.
    I thought of something but it probelly won't work. Recording the current location then setting a timer and then checking it again and recording the second URL. I doubt this would work though unless of course it was on your own server. My best advice would be to browse around php.net. See if you can find anything, Maybe look a little at CURL functions....
    See more | Go to post

    Leave a comment:


  • tscott
    replied to Forms
    in PHP
    Hey,
    I found a slight problem you had with defining your variables. The way you did it, it would litterally look like this if you printed them. Name: $name
    [PHP] $message = "Name: $name\n\n";
    $message .= "Email: $email\n\n";
    $message .= "Project Idea: $comments";[/PHP]
    Try doing it this way.
    [PHP]$message = "Name:" . $name . "\n\n";
    $message...
    See more | Go to post

    Leave a comment:


  • Hey,
    Would it be possible to send half of it to the next page VIA post, then set them as variables then do something like (Sending it to next page)
    [php]
    <?php
    $var1 = $_POST['var1'];
    $var2 = $_POST['var2'];
    echo '<form method=POST action=somethin g.php?var1=' . $var1 .'&var2=' . $var2 .' >The second page form would go here </form>';
    ?>
    [/php]
    That would send half...
    See more | Go to post

    Leave a comment:


  • tscott
    replied to php include
    in PHP
    I know of an easier way that would help you in the long run.
    Divide your code with a | in the places you would make each page with.
    Then set it as a variable in your file, using explode each section is split apart from each other setting each as it's own ID the first portion would be $filearray[0] , 2nd, $filearray[1] etc...

    [php]
    <?php
    $file = '<html>| Random Text | pie | </html>';...
    See more | Go to post

    Leave a comment:


  • tscott
    replied to Copy a file from one server to another
    in PHP
    I said they weren't PHP files, I meant for an example an *.exe file or a *.html file.

    A file that any user could download and upload.
    All I end up with is a blank file.

    Is that possible.
    See more | Go to post

    Leave a comment:


  • Try using Explode to break it up into an array via line breaks.Then you can only echo the lines you want

    example (using spaces)
    [php]
    <?php
    $getfile = file_get_conten ts('textfile.tx t');
    $filearray = explode(' ' , $getfile);
    echo $filearray[0] . ' ' . $filearray[4] , ' ' . $filearray[2];
    // Say the contents is:I random pie dog like//
    //This would say: I like pie//
    ?>...
    See more | Go to post

    Leave a comment:


  • tscott
    replied to Is my site hackable?
    in PHP
    Alright,
    I have known a few hackers and here are the way they can get in.

    RFI/LFI (Remote File Inclusion / Local File Inclusion) -
    Never include something from an input without securing it first. This can be done by using an easy function I made.

    CSS/XSS etc... (Cross site scripting)
    Involves an input that is used within html. Used to steal cookies.
    Allows them to input html into your site...
    See more | Go to post
    Last edited by tscott; Jul 19 '07, 10:36 PM. Reason: quick fix

    Leave a comment:


  • tscott
    replied to Copy a file from one server to another
    in PHP
    I was going to edit my post and say that I don't have FTP access to this server. Although I want to use this to legally get a file and transfer it to my server without having to download and upload it. I've searched google and everywhere. Can't find a tutorial. Maybe there is a way to do it via CURL?
    See more | Go to post

    Leave a comment:


  • Easy if you don't want to use MySQL...
    I'm assuming you have an admin panel/password verification.
    [php]
    <?php
    $password = 'randompass';
    $checkpass = $_POST['passsword'[;
    if(!$password == $checkpass)
    {
    echo 'Incorrect Password';
    exit;
    }
    function edit($data , $file)
    {
    //Creating Connection to file//
    ...
    See more | Go to post

    Leave a comment:


  • tscott
    replied to i need to play aauudio file
    in PHP
    Here's a function to help you out :)
    [php]
    <?php
    //Starting my function//

    function playmusic($musi c)
    {
    //Checking to see if it exists//
    if(file_exists( $music))
    {
    //Showing the music in the user's player//
    echo '<embed src='...
    See more | Go to post
    Last edited by tscott; Jul 18 '07, 11:49 PM. Reason: making it not so wide (obsessed with tabbing)

    Leave a comment:


  • tscott
    started a topic Copy a file from one server to another
    in PHP

    Copy a file from one server to another

    If the permissions are set to 777 of all files and all directories. Is there a possible way to do it without having to download it and upload it again? I don't expect this to work on PHP files. I'm thinking .exe files, etc...

    I've tried using fopen() and fread() and also file_get_conten ts().
    Neither of which worked to get the file, although, oddly, didn't return an error.

    If anyone knows about this can you please...
    See more | Go to post
No activity results to display
Show More
Working...