User Profile

Collapse

Profile Sidebar

Collapse
Anthony2oo5
Anthony2oo5
Last Activity: Sep 4 '08, 11:48 PM
Joined: Jun 13 '07
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • Thanks for your comments, I will defiantly be looking into your suggestions.
    See more | Go to post

    Leave a comment:


  • Also IF its is any good, feel free to use it yourself.
    See more | Go to post

    Leave a comment:


  • Wrote a MySQL function - want some feedback and criticism

    I wrote this function about 2 years ago when I started in PHP, I haven't touched PHP since so im still not an expert, but I would like to know what people thought of it, and if was any good / secure / fast / easy to use ect ect

    Looking for some constructive criticism really and improvements and faults.

    Thanks

    [PHP]<?php

    // Database Function
    function db($Action) {

    ...
    See more | Go to post

  • Anthony2oo5
    replied to Google Maps quick help
    in PHP
    WOW, not one reply ............
    See more | Go to post

    Leave a comment:


  • Anthony2oo5
    started a topic Google Maps quick help
    in PHP

    Google Maps quick help

    Iv been searching for a way to get the distance in miles from one location to another, and thought the best way is using google maps. Back in the day I did this by using a curl command and regular expressions (I know cringe) but im looking into using googles API for it.

    Searched the web and found this:

    http://groups.google.c om/group/Google-Maps-API/browse_thread/thread/5c40d54ac3da139 3

    Which he claims...
    See more | Go to post

  • Anthony2oo5
    replied to sort() and an array. Quick question.
    in PHP
    Thanks and sorry for the late reply.

    I will have a mess with your method after Christmas and try to implement it. I looked through the different sorts on the php website but things got confusing lol.

    Thanks very much for your time :)
    See more | Go to post

    Leave a comment:


  • Anthony2oo5
    replied to PHP Forms Security
    in PHP
    Im no expert so you might want to hold out for an expert to reply but I have been doing this for a while.

    When I first started I used safeHTML, which seemed to do a good job, was quick at what it done.

    I'm writing a script now and im trying to stay away from it simply for the fact that I want to learn myself.

    Id suggest writing a function of some sort that would get what the user is submitting, and use...
    See more | Go to post

    Leave a comment:


  • Anthony2oo5
    replied to Disable refresh toolbar and F5 key
    in PHP
    even though this is NOT a PHP question, I did not think this was possible. In fact its not. But you can stop them pressing the F5 key.:

    http://www.gklein.org/tests/js/disablekey.html

    I just tested it and it stopped my pressing F5 in Firefox 3 (haven't got any lower instilled tot try it) and IE 7.
    See more | Go to post

    Leave a comment:


  • Anthony2oo5
    started a topic sort() and an array. Quick question.
    in PHP

    sort() and an array. Quick question.

    Hello people, just a quick question I have here.

    My array looks like this:

    [PHP]Array (
    [0] => Array (
    [id] => 15
    [site_url] => example.com
    [clean_url] => examplecom
    [code] => NshKsi23
    [success] => 1
    [fail] => 1
    [success_rate] => 50
    [fail_rate] => 50
    [description] => Free delivery.
    ...
    See more | Go to post

  • Anthony2oo5
    replied to Image optimization Emergency lol
    in PHP
    I think he is useing GD functions or imagemagic. It will help because it is a iamge hosting site. The data being sent will still be large but when all the users come to see it it will have a reduced size.
    See more | Go to post

    Leave a comment:


  • Can you post the code again without quoteing it in PHP tags so I can copy it to my editor otherwise I have numbers down the side.
    See more | Go to post

    Leave a comment:


  • Anthony2oo5
    started a topic Image optimization Emergency lol
    in PHP

    Image optimization Emergency lol

    Image optimization Emergency lol

    Hey guys. I have a image hosting website that seems to have taken off over the past 2 days and jumped from 6GB per day, to 25 GB and rising.

    I was wondering if there is a way to help lower this bandwidth problem. I wanted to optimise images that people upload.

    I found a function on this webpage that says it can do it, but it only works with jpegs.

    http://nodstrum.com/2007/02/06/imagemagick_man ipulation/...
    See more | Go to post

  • Hey thanks both I will try these solutions later.

    I have a function for getting the file extension. I used one similar to what you have wrote but it didn't work for reading the file extension inside zip files, so I made another one:

    [PHP] function GetFileExt($fil ename) {
    return end(explode("." , $filename));
    }[/PHP]

    Thanks again, I will come back and update with my progres...
    See more | Go to post

    Leave a comment:


  • Using an array to check for valid file extensions in PHP

    Hey there,

    I'm trying to write a script for uploading images but only with certain file extensions. Currently I have it working by:

    [PHP]if (($FileExt = "jpg") || ($FileExt = "gif"))[/PHP]

    ect, but is there a way i can do:

    [PHP]$allowed = array("jpg", "gif");
    if $allowed[/PHP]

    I tried that but the if always turned out false....
    See more | Go to post

  • Anthony2oo5
    replied to Image Downloading small problem
    in PHP
    Just didn't want hackers knowing my script. can you censor like 4 and 40 please.

    Thanks :)
    See more | Go to post

    Leave a comment:


  • Anthony2oo5
    replied to Image Downloading small problem
    in PHP
    YEY, file get contents works great thanks very much for all the help.

    May I have one request?, can I have the code from my second post removed please? Everything else can stay.

    Once again thanks all.
    See more | Go to post

    Leave a comment:


  • Anthony2oo5
    replied to Image Downloading small problem
    in PHP
    no, I have the above code in a php file, then just run the file directly. I had curl to get the image (i may have said cron before sorry), but changed it to fopen as you said.

    Will have a go of file get contents....
    See more | Go to post

    Leave a comment:


  • Anthony2oo5
    replied to Image Downloading small problem
    in PHP
    Ok, now it sort of works lol. But the file only seems to half download, Check here:

    [ur]http://piczy.net/Image-MCTWK.gif[/url]

    I changed the Cron job with the following:

    [PHP]$fh = fopen($address, 'r') or die("Can't open file");
    $data = fread($fh, 524288000000);
    fclose($fh);[/PHP]

    Note all the 0000000 at the end was me upping the limit to see if thats why it was stopping....
    See more | Go to post

    Leave a comment:


  • Anthony2oo5
    replied to Image Downloading small problem
    in PHP
    Will try that in a sec, thanks.

    Was going to use that but thought curl was quicker....
    See more | Go to post

    Leave a comment:


  • Anthony2oo5
    replied to Image Downloading small problem
    in PHP
    [PHP]<?php
    include ('includes/functions.php') ;
    $Error = "";
    $UploadDIR = 'images/';
    $ShortenTo = 15;

    function RemoteGet($addr ess) {
    // Connect to the google website to find the millage
    $ch = curl_init();
    curl_setopt($ch , CURLOPT_URL, $address);
    curl_setopt($ch , CURLOPT_HEADER, 1);
    curl_setopt($ch , CURLOPT_RETURNT RANSFER, 1);
    $data = curl_exec($ch);...
    See more | Go to post

    Leave a comment:

No activity results to display
Show More
Working...