Okay so I was playing around with flash and felt a need to make a workaround to get flash files from the internet, well I got all the way up to the part where I just gotta save the file.. It should save but it doesn't.. Help please
PHP Code:
function onCreated() {
Flash("http://64.191.61.82/albino_games04/curveball(www.albinoblacksheep.com).swf");
}
function Flash(url) {
temp.req = requesturl("http://mywebserver.com/google.php?url=" @ url);
this.catchevent(temp.req,"onReceiveData","onFlash");
}
function onFlash(obj) {
temp.filename = "flashtest.swf";
echo("File Name?" SPC temp.filename);
echo("File Length?" SPC obj.fulldata.length());
obj.fulldata.savestring("levels/flash/" @ temp.filename,0);
echo(temp.filename SPC "should be saved to your flash folder!");
}
PHP Code:
<?php
//Google.php
foreach ($_GET as $index => $val)
$$index = $val;
echo open_external_url($url);
function open_external_url($url) {
$ch = curl_init($url);
ob_start();
curl_exec($ch);
curl_close($ch);
$data = ob_get_contents();
ob_end_clean();
return $data;
}
?>