Jump to content

[SOLVED] combinations


dezkit

Recommended Posts

$alpha = "A B C D E F G H I J K L M N O P Q R S T U V W X Y Z";

$alphaArray = split(" ", $alha);

foreach ($alphaArray as $alpha) {
        foreach ($alphaArray as $alpha2) {
              echo $alpha . $alpha2 ", ";
        }
}

 

 

Link to comment
Share on other sites

Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ',' or ';' in /home/cobi/public_html/testtt.php on line 8

 

<?php
$alpha = "A B C D E F G H I J K L M N O P Q R S T U V W X Y Z";

$alphaArray = split(" ", $alha);

foreach ($alphaArray as $alpha) {
        foreach ($alphaArray as $alpha2) {
              echo $alpha . $alpha2 ", "; // line 8
        }
}
?>

line 8

Link to comment
Share on other sites

Nevermind, i fixed it, but it shows nothing but a comma on my page

 

<?php
$alpha = "A B C D E F G H I J K L M N O P Q R S T U V W X Y Z";

$alphaArray = split(" ", $alha);

foreach ($alphaArray as $alpha) {
        foreach ($alphaArray as $alpha2) {
              echo $alpha . $alpha2 . ", ";
        }
}
?>

 

 

Link to comment
Share on other sites

Nevermind, i fixed it, but it shows nothing but a comma on my page

 

<?php
$alpha = "A B C D E F G H I J K L M N O P Q R S T U V W X Y Z";

$alphaArray = split(" ", $alha);

foreach ($alphaArray as $alpha) {
        foreach ($alphaArray as $alpha2) {
              echo $alpha . $alpha2 . ", ";
        }
}
?>

 

 

 

<?php
$alpha = "A B C D E F G H I J K L M N O P Q R S T U V W X Y Z";

$alphaArray = split(" ", $alpha); //spelling type here

foreach ($alphaArray as $alpha) {
        foreach ($alphaArray as $alpha2) {
              echo $alpha . $alpha2 . ", ";
        }
}
?>

 

Spelling typo on my part. That should work.

Link to comment
Share on other sites

I got one more question, i have this right now

 

<?php
$alpha = "A B C D E F G H I J K L M N O P Q R S T U V W X Y Z";

$alphaArray = split(" ", $alpha);

foreach ($alphaArray as $alpha) {
        foreach ($alphaArray as $alpha2) {
              echo $alpha . $alpha2 . "<br>";
        }
}

?>

 

Is it possible so that every combination gets checked if its valid in "http://profile.mygamercard.net/*". If the gamertag exists, echo true, and if not echo false.

 

elaborated:

- php fread http://profile.mygamercard.net/x (x as in the combination of letters)

- if the content displays "does not exist on Xbox Live!", echo false

- Else echo true

 

 

Thanks sooooooooooooooo much in advance!!! :)

Link to comment
Share on other sites

Is it possible so that every combination gets checked if its valid in "http://profile.mygamercard.net/*". If the gamertag exists, echo true, and if not echo false.

 

elaborated:

- php fread http://profile.mygamercard.net/x (x as in the combination of letters)

- if the content displays "does not exist on Xbox Live!", echo false

- Else echo true

 

Yes, that's possible. You'd just need to parse the web page to find out if the gamertag exists or not. Of course, the website might not be too happy with you bombarding them with requests.

 

$alpha = "A B C D E F G H I J K L M N O P Q R S T U V W X Y Z";
$alphaArray = split(" ", $alha);

 

The range function exists for a reason :P

Link to comment
Share on other sites

Is it possible so that every combination gets checked if its valid in "http://profile.mygamercard.net/*". If the gamertag exists, echo true, and if not echo false.

 

elaborated:

- php fread http://profile.mygamercard.net/x (x as in the combination of letters)

- if the content displays "does not exist on Xbox Live!", echo false

- Else echo true

 

Yes, that's possible. You'd just need to parse the web page to find out if the gamertag exists or not. Of course, the website might not be too happy with you bombarding them with requests.

 

$alpha = "A B C D E F G H I J K L M N O P Q R S T U V W X Y Z";
$alphaArray = split(" ", $alha);

 

The range function exists for a reason :P

 

You learn something new every day =)

Link to comment
Share on other sites

Sorry for so much bumping (really i am.) but i have this code:

<?php
$alpha = "a b c d e f g h i j k l m n o p q r s t u v w x y z 1 2 3 4 5 6 7 8 9 0";

$alphaArray = split(" ", $alpha); //spelling type here

foreach ($alphaArray as $alpha) {
        foreach ($alphaArray as $alpha2) {
           
           $main = $alpha.$alpha2;
           $filename = "http://profile.mygamercard.net/$main";
           $handle = fopen($filename, "r");
           if(strpos($handle, "does not exist on Xbox Live!") > 0){
            echo "true"; 
           } else {
            echo "false";
           }

        }
}

?>

 

I keep getting error "Warning: fopen(http://profile.mygamercard.net/aa) [function.fopen]: failed to open stream: HTTP request failed! HTTP/1.0 403 Forbidden in /home/cobi/public_html/testtt.php on line 11

false"

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.