Jump to content

a2bardeals

Members
  • Posts

    62
  • Joined

  • Last visited

    Never

Contact Methods

  • Website URL
    http://www.barcheese.com

Profile Information

  • Gender
    Male
  • Location
    Ann Arbor, MI

a2bardeals's Achievements

Member

Member (2/5)

0

Reputation

  1. ok well i figured out the error problem by deleting the APC folder, re-extracting it and starting over.... but running phpize from the php5 directory didn't work.. the extension still ended up in the usr/lib/php/extensions rather than usr/local/php5/lib/php/extensions... Any help would be amazing... P.S. (it did look like it was phpize-ing for the current version though, when it spits out the PHP API version and the Zend Module Api No at the start of phpize but after running ./configure, make and make install it ends up in a different extensions directory)
  2. i can't seem to get PECL to work and i can't find it anywhere in my PHP 5 installation. i am runing PHP 5 on Mac OS X. i tried running phpize from the usr/local/php5/bin path where the current version of PHP's phpize resides. after running phpize and ./configure everything seems to work ok... but when i try to "make" i get: make: *** [apc.la] Error 1 i didn't get that when i compiled for the old php. any ideas?
  3. i did something just like this not to long ago. i used Flash's media playback component to load and stream mp3 files on a my page. it's pretty easy and only takes a few lines of Actionscript. Basically i started with data from a MySQL table with ID, Title, Artist, & Path columns. for example, using php to retrive song ID: 393 it loads the artist, title, path variables for that track display the title and artist variables in PHP: <?php $result = mysql_query("SELECT artist, title, path FROM music WHERE ID = `393` LIMIT 1" while ($row = mysql_fetch_array($result)){ echo 'Artist: '.$row[0].'<br>'; echo 'Title: '.$row[1]; $file_path = $row[2]; } ?> then pass the $file_path variable into flash like this (notice you have to pass it twice) <OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/" WIDTH="250" HEIGHT="300" id="player"> <PARAM NAME=movie VALUE="player.swf[b]?path=<?php echo $file_path; ?>[/b]"> <PARAM NAME=quality VALUE=high> <PARAM NAME=bgcolor VALUE=#FFFFFF> <EMBED src="player.swf[b]?path=<?php echo $file_path; ?>[/b]" quality=high bgcolor=#FFFFFF WIDTH="250" HEIGHT="300" NAME="player" TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer"> </EMBED> </OBJECT> to create the empty player. you should add flash's media playback component to a new Flash project. Set the instance name to "media" in the properties window and set it's media type to mp3 in the component inspector. Select the first (and only) frame of the movie and open the actions window. Pass the variable like this: var passed:String = path; media.setMedia(path); export the flash movie as player.swf and save it in the same directory as the page retrieving the info from the database. you should be all set!
  4. i am trying to install the APC (http://pecl.php.net/package/APC) extension for PHP 5. i am trying to compile using phpize but when i do the make install it installs the extension to another version of php on my system.. i tried moving the apc.so file into the PHP5 extensions directory but when i do that Apache wont start. My question is, how do i get phpize and make install to compile the extension on PHP5 rather then the old PHP on my system?
  5. well i have just purchased the new OS X with Xcode for my server which should give me a compiler and allow me to use cURL and I will try that route and updating my PHP version should help as well
  6. ok well i do not have a windows version...I have a Mac OS X version (UNIX version) of PHP 4.1.2 should that matter?
  7. still nothing...im starting to think there is no workaround which is why cURL and file_get_contents were introduced maybe?
  8. returns nothing...am i calling the function right? <? function file_get_contents2($filename) { $fd = fopen("$filename", "rb"); $content = fread($fd, filesize($filename)); fclose($fd); return $content; } $string = file_get_contents2('http://maps.google.com/maps/geo?key=ABQIAAAAR0Cth1uWGX8aUnZOUNxxDRSTa-vPv41zs_3mMYBEENmT6-JqMxQvgmczA_f8sbJvBlQCW7hrjqwVQA&output=cvs&q=3060+Packard+Rd,+Ann+Arbor,+MI'); echo $string; ?>
  9. ok I love the help... however I have tried both...I cannot install cURL on the system and I'm only running PHP 4.1.2 which does not include the file_get_contents() function....are these the only ways of doing this?
  10. I am trying to create a PHP page with a variable's value being looked up from google's geocoding service. Basically I have a MySQL database table with customer names and addresses. On the page I am working on I want to do a quick lookup to: http://maps.google.com/maps/geo?q=Address+Info&key=abcdefg&output=csv when you type this in a browser in returns a small line of text that has the lat/long seperated by commas. How can I get that data from the HTTP request into a variable without leaving my site? I know you can use cURL but I cannot install it on my system (no compiler) so I am looking for an alternative... i was thinking i could use fopen() or fsockopen() but I have no idea how to set this up. Any ideas?
  11. my Apache did come with PHP (Mac OS X includes apache as "Web Sharing" as well as PHP) I have PHP Version 4.1.2 but no cURL installed i tried the code: <?php $ch = curl_init("http://www.example.com/"); $fp = fopen("example_homepage.txt", "w"); curl_setopt($ch, CURLOPT_FILE, $fp); curl_setopt($ch, CURLOPT_HEADER, 0); curl_exec($ch); curl_close($ch); fclose($fp); ?> and i get a call to unknown variable curl_init
  12. i am running my own server with whatever PHP libraries that come with standard Apache how do I know if I have cURL?
  13. is cURL the only way? it seems a bit hard to do and I don't know much about compiling PHP or anything related to installing things via command line.
  14. ok so I don't even know how to ask this question but i'll try anyways... Google has a geocoding system now and they have it setup so that you can send an HTTP request to find lat and long of an address. I want to be able to save the outputed info into PHP variables. On the documentation page from google it says this: how the #$@! do i send a HTTP request inside a page on my server. I want to quickly find the lat/long of a users address and calculate distance from a store. If i simply type the URL in http://maps.google.com/maps/geo?key=ABCDEFG&q=200+N+MAIN+ST,+NEW+YORK,+NY&output=csv i get a nice little text string with 4 comma seperated values two of which i want to store into variables (lat/long) then pass on to another page which will insert them into the users MySQL row. Seems pretty simple uh? But how do i create the HTTP request inside my document and use the outputed info from google?
  15. so I am using an earlier version of PHP that does not have the file_get_contents function. I am trying to request a URI from google's geocoding API. Is there a way to request (include) an external file within a page with out this function?
×
×
  • 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.