Originally posted by: fs5
does myspace allow javascript to be either src'd or inline
Originally posted by: OdiN
If you can put javascript in yeah.
Apparently you can't. That makes no ****** sense. I mean...what the ******? You can have all these flash pieces of ****** in there and all the glittery faggoty text ****** but you can't have javascript? BULLSHIT! Stupid ******.
Originally posted by: keeleysam
Use PHP and Flash.
Or ditch myspace.
Originally posted by: GrantMeThePower
Just leave myspace and start a revolution for the betterment of humanity
Originally posted by: fs5
how about iframes?
<img src="http://www.path.to/random.php" />
<?php
$folder = '.'; //This is your folder. If you leave it as it, it's the folder where the PHP file is located on your server, that's where it'll look for your images.
$extList = array();
// Set these for your file types.
$extList['gif'] = 'image/gif';
$extList['jpg'] = 'image/jpeg';
$extList['jpeg'] = 'image/jpeg';
$extList['png'] = 'image/png';
//That's it. If you're not experienced with PHP, don't touch this.
$img = null;
if (substr($folder,-1) != '/') {
$folder = $folder.'/';
}
if (isset($_GET['img'])) {
$imageInfo = pathinfo($_GET['img']);
if (
isset( $extList[ strtolower( $imageInfo['extension'] ) ] ) &&
file_exists( $folder.$imageInfo['basename'] )
) {
$img = $folder.$imageInfo['basename'];
}
} else {
$fileList = array();
$handle = opendir($folder);
while ( false !== ( $file = readdir($handle) ) ) {
$file_info = pathinfo($file);
if (
isset( $extList[ strtolower( $file_info['extension'] ) ] )
) {
$fileList[] = $file;
}
}
closedir($handle);
if (count($fileList) > 0) {
$imageNumber = time() % count($fileList);
$img = $folder.$fileList[$imageNumber];
}
}
if ($img!=null) {
$imageInfo = pathinfo($img);
$contentType = 'Content-type: '.$extList[ $imageInfo['extension'] ];
header ($contentType);
readfile($img);
} else {
if ( function_exists('imagecreate') ) {
header ("Content-type: image/png");
$im = @imagecreate (100, 100)
or die ("Cannot initialize new GD image stream");
$background_color = imagecolorallocate ($im, 255, 255, 255);
$text_color = imagecolorallocate ($im, 0,0,0);
imagestring ($im, 2, 5, 5, "IMAGE ERROR", $text_color);
imagepng ($im);
imagedestroy($im);
}
}
?>
^^ lol edit...Originally posted by: LoKe
You guys are putting way too much thought into it. You can still use PHP.
This is your HTML code :
<img src="http://www.path.to/random.php" />
This is your PHP code :
<?php
$folder = '.'; //This is your folder. If you leave it as it, it's the folder where the PHP file is located on your server, that's where it'll look for your images.
$extList = array();
// Set these for your file types.
$extList['gif'] = 'image/gif';
$extList['jpg'] = 'image/jpeg';
$extList['jpeg'] = 'image/jpeg';
$extList['png'] = 'image/png';
//That's it. If you're not experienced with PHP, don't touch this.
$img = null;
if (substr($folder,-1) != '/') {
$folder = $folder.'/';
}
if (isset($_GET['img'])) {
$imageInfo = pathinfo($_GET['img']);
if (
isset( $extList[ strtolower( $imageInfo['extension'] ) ] ) &&
file_exists( $folder.$imageInfo['basename'] )
) {
$img = $folder.$imageInfo['basename'];
}
} else {
$fileList = array();
$handle = opendir($folder);
while ( false !== ( $file = readdir($handle) ) ) {
$file_info = pathinfo($file);
if (
isset( $extList[ strtolower( $file_info['extension'] ) ] )
) {
$fileList[] = $file;
}
}
closedir($handle);
if (count($fileList) > 0) {
$imageNumber = time() % count($fileList);
$img = $folder.$fileList[$imageNumber];
}
}
if ($img!=null) {
$imageInfo = pathinfo($img);
$contentType = 'Content-type: '.$extList[ $imageInfo['extension'] ];
header ($contentType);
readfile($img);
} else {
if ( function_exists('imagecreate') ) {
header ("Content-type: image/png");
$im = @imagecreate (100, 100)
or die ("Cannot initialize new GD image stream");
$background_color = imagecolorallocate ($im, 255, 255, 255);
$text_color = imagecolorallocate ($im, 0,0,0);
imagestring ($im, 2, 5, 5, "IMAGE ERROR", $text_color);
imagepng ($im);
imagedestroy($im);
}
}
?>
Alright, so, the PHP is on your server, the HTML is on myspace. As I said in the comments, the $folder is equivalent to the path of your images. If you leave it to default, it'll randomize all the files in the folder in which the PHP script is located.
Here's an example : Text
EDIT : SOB! QUOTES! I thought images. 🙁
Originally posted by: insename2
^^ lol edit...Originally posted by: LoKe
You guys are putting way too much thought into it. You can still use PHP.
This is your HTML code :
<img src="http://www.path.to/random.php" />
This is your PHP code :
<?php
$folder = '.'; //This is your folder. If you leave it as it, it's the folder where the PHP file is located on your server, that's where it'll look for your images.
$extList = array();
// Set these for your file types.
$extList['gif'] = 'image/gif';
$extList['jpg'] = 'image/jpeg';
$extList['jpeg'] = 'image/jpeg';
$extList['png'] = 'image/png';
//That's it. If you're not experienced with PHP, don't touch this.
$img = null;
if (substr($folder,-1) != '/') {
$folder = $folder.'/';
}
if (isset($_GET['img'])) {
$imageInfo = pathinfo($_GET['img']);
if (
isset( $extList[ strtolower( $imageInfo['extension'] ) ] ) &&
file_exists( $folder.$imageInfo['basename'] )
) {
$img = $folder.$imageInfo['basename'];
}
} else {
$fileList = array();
$handle = opendir($folder);
while ( false !== ( $file = readdir($handle) ) ) {
$file_info = pathinfo($file);
if (
isset( $extList[ strtolower( $file_info['extension'] ) ] )
) {
$fileList[] = $file;
}
}
closedir($handle);
if (count($fileList) > 0) {
$imageNumber = time() % count($fileList);
$img = $folder.$fileList[$imageNumber];
}
}
if ($img!=null) {
$imageInfo = pathinfo($img);
$contentType = 'Content-type: '.$extList[ $imageInfo['extension'] ];
header ($contentType);
readfile($img);
} else {
if ( function_exists('imagecreate') ) {
header ("Content-type: image/png");
$im = @imagecreate (100, 100)
or die ("Cannot initialize new GD image stream");
$background_color = imagecolorallocate ($im, 255, 255, 255);
$text_color = imagecolorallocate ($im, 0,0,0);
imagestring ($im, 2, 5, 5, "IMAGE ERROR", $text_color);
imagepng ($im);
imagedestroy($im);
}
}
?>
Alright, so, the PHP is on your server, the HTML is on myspace. As I said in the comments, the $folder is equivalent to the path of your images. If you leave it to default, it'll randomize all the files in the folder in which the PHP script is located.
Here's an example : Text
EDIT : SOB! QUOTES! I thought images. 🙁
images? guess he'll have to save his quotes as a jpg or something...
Originally posted by: austin316
Originally posted by: insename2
^^ lol edit...Originally posted by: LoKe
You guys are putting way too much thought into it. You can still use PHP.
This is your HTML code :
<img src="http://www.path.to/random.php" />
This is your PHP code :
<?php
$folder = '.'; //This is your folder. If you leave it as it, it's the folder where the PHP file is located on your server, that's where it'll look for your images.
$extList = array();
// Set these for your file types.
$extList['gif'] = 'image/gif';
$extList['jpg'] = 'image/jpeg';
$extList['jpeg'] = 'image/jpeg';
$extList['png'] = 'image/png';
//That's it. If you're not experienced with PHP, don't touch this.
$img = null;
if (substr($folder,-1) != '/') {
$folder = $folder.'/';
}
if (isset($_GET['img'])) {
$imageInfo = pathinfo($_GET['img']);
if (
isset( $extList[ strtolower( $imageInfo['extension'] ) ] ) &&
file_exists( $folder.$imageInfo['basename'] )
) {
$img = $folder.$imageInfo['basename'];
}
} else {
$fileList = array();
$handle = opendir($folder);
while ( false !== ( $file = readdir($handle) ) ) {
$file_info = pathinfo($file);
if (
isset( $extList[ strtolower( $file_info['extension'] ) ] )
) {
$fileList[] = $file;
}
}
closedir($handle);
if (count($fileList) > 0) {
$imageNumber = time() % count($fileList);
$img = $folder.$fileList[$imageNumber];
}
}
if ($img!=null) {
$imageInfo = pathinfo($img);
$contentType = 'Content-type: '.$extList[ $imageInfo['extension'] ];
header ($contentType);
readfile($img);
} else {
if ( function_exists('imagecreate') ) {
header ("Content-type: image/png");
$im = @imagecreate (100, 100)
or die ("Cannot initialize new GD image stream");
$background_color = imagecolorallocate ($im, 255, 255, 255);
$text_color = imagecolorallocate ($im, 0,0,0);
imagestring ($im, 2, 5, 5, "IMAGE ERROR", $text_color);
imagepng ($im);
imagedestroy($im);
}
}
?>
Alright, so, the PHP is on your server, the HTML is on myspace. As I said in the comments, the $folder is equivalent to the path of your images. If you leave it to default, it'll randomize all the files in the folder in which the PHP script is located.
Here's an example : Text
EDIT : SOB! QUOTES! I thought images. 🙁
images? guess he'll have to save his quotes as a jpg or something...
anyway to do this as text? or should I just save my quotes as .gifs?
or make an animated .gif?
Originally posted by: austin316
anyway to do this as text? or should I just save my quotes as .gifs?
or make an animated .gif?
Originally posted by: MathMan
Originally posted by: austin316
anyway to do this as text? or should I just save my quotes as .gifs?
or make an animated .gif?
Actually, you can use the GD lib with PHP to convert a text string into a graphic image on the fly.
It'd be pretty easy to write a PHP script which grabbed a line from a text file containing all of your quotes, and then create a gif file with that quote.