Jump to content

javier

New Members
  • Posts

    7
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

javier's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Well.. it seems that the simplexml is not a default extension.. so I'd have to load it dynamically... Anyone has more information about this extension? (How to load it, with the dl() function I suppose)
  2. Hello, I'm using the simplexml_load_string function to get info off an XML file. It works perfectly on my computer, but when I upload it to my webserver (iespana.es) it displays this error; Fatal error: Call to undefined function: simplexml_load_string() in /-pathtofolder-/movie.php on line 23 Any ideas of what causes it and how to solve it?
  3. Are you using xampp or wamp? They usually come with something like a Control Panel to start and stop services like PHP, MySQL, etc., you might want to look around for that. I think that's what you asked for.
  4. :@ Stupid permission thing, I couldn't post until now, I think it's because of something in my code, so I'll paste it in pastebin.com, anyway ____________________ Hello, I'm working on a script to upload flash movies to my site, and then displaying them on automatically generated php pages. So far I figured out how to create the xml files with the info from a form filled out previously. The thing is, how to 'extract' that info to show it on a new php page? The XML generated files look something like this; [a href=\"http://pastebin.com/736302\" target=\"_blank\"]XML Part[/a] Then, on php I tried this: [a href=\"http://pastebin.com/736312\" target=\"_blank\"]PHP Part[/a] Note: that's not the full script on php, that's only the part that is supossed to get the information off the XML file. Any ideas of what's wrong here? It might be the XML file itself.
  5. Gah! I need help and I can't start a New Topic. What's wrong?
  6. Hello, I've been working with a script to display certain information from my game's characters over a png rectangle, something like this: |Info here| The thing is, I'd like to color it with a vertical gradient, but I haven't been able to do so. I got this code off some webiste (might be outdated..?): [code] function imagecolorgradient($img, $hv, $x1, $y1, $x2, $y2, $f_c, $s_c) {   // Modified version of code by info@solanki.ch taken from php.net   // posted: 14-Feb-2004 07:43   // $img is the image handle.   // $hv is either horizontal 'h' or vertical 'v' gradient.   // $x1 and $y1 are the start points.   // $x2 and $y2 the ending points.   // $f_c and $s_c are the first and second color ARRAYs.   if ($hv == 'v')   {     $y = ($y2 > $y1) ? $y2-$y1 : $y1-$y2;   }   else   {     $x = ($x2 > $x1) ? $x2-$x1 : $x1-$x2;       }        $r_range = ($f_c[0] > $s_c[0]) ? $f_c[0] - $s_c[0] : $s_c[0] - $f_c[0];   $g_range = ($f_c[1] > $s_c[1]) ? $f_c[1] - $s_c[1] : $s_c[1] - $f_c[1];   $b_range = ($f_c[2] > $s_c[2]) ? $f_c[2] - $s_c[2] : $s_c[2] - $f_c[2];   if ($hv == 'v')   {     $r_px=$r_range/$y;     $g_px=$g_range/$y;     $b_px=$b_range/$y;     $xy = $y;   }   else   {     $r_px=$r_range/$x;     $g_px=$g_range/$x;     $b_px=$b_range/$x;     $xy = $x;   }        $r=$f_c[0];   $g=$f_c[1];   $b=$f_c[2];      for($i=0;$i<=$xy;$i++)   {     $col=imagecolorallocate($img,round($r),round($g),round($b));     if ($hv == 'v')     {       imageline($img,$x1,$y1+$i,$x2,$y1+$i,$col);     }     else     {       imageline($img,$x1+$i,$y1,$x1+$i,$y2,$col);     }          $r = ($f_c[0] < $s_c[0]) ? $r + $r_px : $r - $r_px;     $g = ($f_c[1] < $s_c[1]) ? $g + $g_px : $g - $g_px;     $b = ($f_c[2] < $s_c[2]) ? $b + $b_px : $b - $b_px;   }   return $img; } [/code] The thing is, I don't know how to create the gradient off that code. I tried the following: [code] imagecolorgradient($myImage, 1, 20, ($iWidth-2), ($iHeight-2), $dkblue, $blue); // where $myImage = imagecreate($iWidth, $iHeight); //and $blue, $dk blue are rgb colors [/code] That's about it. Any help would be appreciated.
×
×
  • 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.