Jump to content

warnockm

Members
  • Posts

    26
  • Joined

  • Last visited

Profile Information

  • Gender
    Not Telling

warnockm's Achievements

Member

Member (2/5)

0

Reputation

  1. I've created a SOAP server in PHP 5.0 using SoapServer(). The functions i've added work fine using simple datatypes, but when i use complex datatypes, i run into problems. i'm using a class to define my functions. For a few of the functions, i return complex data types, which are instances of another class. My question is: what do i use as my target namespace? Right now i start the webserver with: $server = new SoapServer( NULL, array('uri' => "urn://www.w3.org/2001/12/soap-encoding") ); $server->SetClass('ws'); $server->handle(); "ws" is the name of my class with the functions.
  2. I'm trying to add a search api to an application. By search API, i mean i want to add search capability for external applications, using a standard protocol like Z39.50, OAI-PMH, or OpenSearch. I want external programs to be able to connect to a webpage on my site and search my application and return results to it, like wikipedia and amazon provide. I've had some luck on the "Client" side by using Pear::Services_OpenSearch. Does this module let you create opensearch applications?
  3. I'm running Apache 2.2.3, PHP 5.2 and MySQL 5.0 on a Windows XP SP2 machine.  Everything installed fine and i configured each module to work w/ the other.  Next i installed phpMyAdmin 2.9.1.1 and the first time i ran it, it ran fine.  Now, when i start it, an instance of http hangs w/ cpu running high.  If i kill the instance and reload, sometimes it works.  I tried using the php module - apache_filtered, and the first time i ran phpMyAdmin w/ the new module it worked, but on a reload it did not.  Same when i switched back to the standard php-apache module.  It's very hit and miss when it works, about 50/50 but leaning towards more of not working.  Is there something could be causing this?
  4. i think the CURL_HEADER bug report is pretty old.  I've had success using CURL_HEADER, however, all it does is puts the header in w/ the data, so you get: Content-type: text/html ... etc at the top, and then the response <html> ... etc after that.  Someone wrote something the separates the responses.  apparently its just 2 new lines/carriage returns:http://us2.php.net/manual/en/function.curl-setopt.php#44986.  I was hoping to have it built into the CURL functions, since i can't see how having the header and response in the same would be that useful.
  5. and is that the header and content separately?  That feature isn't documented.
  6. i'm trying to use php and CURL to view the header to get the content-type and the file data.  I use the curl option: CURLOPT_HEADER true to see the header, but i want to get the file data and header separately.  is that possible?
  7. no one has been replying on here.  Is it me or my questions??????
  8. I have a very odd problem, but i'm sure the members of phpfreaks can help.  I have a linux server running PHP 5.1.  I mounted a windows filesharing using cifs.  The mounted directory is owned by www, my web service user.  I'm using PHP to create a directory (mkdir($dir, 0777) on the share and store files in there.  When i write them, i get a file permission error.  When i look at the permssions, i see it is own by root, even through it was created by php (www). drwxr-xr-x 2 root root 0 Sep 22 16:11 new_dir I understand why its not writable.  www can't write to this.  However, the interesting thing is, when i run the script again, and it doens't have to create the directory, the files store.  after the second run, the permissons change to: drwxrwxrwx 1 root root 0 Sep 22 16:26 new_dir Also, the colors in bash change to green/white, and dircolors say its: "STICKY_OTHER_WRITABLE 30;42 # dir that is sticky and other-writable (+t,o+w)" Why is it creating a directory owned by root.  and then why do the permissions change?  I'm doing nothing to change the permissions.  i just check if the dir exists, create it if it doesn't, and write files to the new dir.  Is it something w/ the way i mount the share? thanks!
  9. Does anyone know of something that's been released that spiders websites?  Specifically, i want to give it a site (or a list of them) and have it spider them, staying only in that site, and download all of the documents, like .doc or .pdfs.  Then return periodically and report the changes and download the new ones.  Has anyone seen anything like this in PHP?  i'll code it myself if i have to , but might as well not reinvent the wheel.  Thanks!
  10. I using HTML forms to copy and paste information from webpages and Word documents.  The data is stored in a mysql database (default Latin1_swedish_ci).  Certain characters, like quotes, look weird.  They will return as letters w/ accents, and even the TM trademark symbol when i view it in phpMyAdmin.  It then display correctly in HTML, and when emailed in HTML to outlook. The problem is, i'm creating text based files that can only have ASCII, and these quotes and other characters are not showing up as the proper quotes, they are shoing up as a series of weird characters.  Is there a way to convert these quotes to normal, non-directional, quotes, or convert the encoding or charset?  I'm not really sure what i'm dealing w/ so i could use the help. this is an example of the weird chars: – is in the sql database, pasted from a webpage.  The webpage displays in the browser as a long dash - and "&ndash;" in the html code.
  11. i'm trying to do some things in PHP where i have to connect to a webserver that requries a server certificate (.crt file) to be installed.  my php script is the client and IIS is the server.  How do i import a certificate for PHP to see?  is it in PHP or openssl?  thanks
  12. [!--quoteo(post=389324:date=Jun 29 2006, 12:26 PM:name=Buyocat)--][div class=\'quotetop\']QUOTE(Buyocat @ Jun 29 2006, 12:26 PM) [snapback]389324[/snapback][/div][div class=\'quotemain\'][!--quotec--] It looks like your for loop would work just fine... try this for ($i = 0; $i < count($array); $i++) { // do some stuff here // if you remove a value from $array then do this $i = 0; } So, you start the loop over every time you remove a value, that way you'll be sure not to skip anything. The while loop I had suggested before just checks for the condition, you're right it may not help if you need to be at the ith place in both arrays at once, but if you can coordinate the arrays without using $i then it may still work. [/quote] I don't think this work work. picture the scenario where i have 6 values (index 0 -> 5). I then remove #2 and #4. I'm left with elements 0, 1, 3, 5. I now only have 4 elements in the array. If i loop i = 0 to 4, i is going to be 0, 1, 2, 3 but i need it to be 0, 1, 3, 5. Or i need it to be 0, 1, 2, 3, 4, 5 and check of the element exists. it would not on #2, and #4. Am i totally missing something? thanks everyone, edit: i'm using unset() to remove the value. is that correct?
  13. [!--quoteo(post=389312:date=Jun 29 2006, 11:53 AM:name=Buyocat)--][div class=\'quotetop\']QUOTE(Buyocat @ Jun 29 2006, 11:53 AM) [snapback]389312[/snapback][/div][div class=\'quotemain\'][!--quotec--] Try using a while loop, while (count($_index_array) > 0) { // do stuff and here and remove the index from $_index_array upon success } [/quote] Won't this do the same thing as a foreach loop? How do i get the index value of the array?
  14. Hi, i have a problem i can't seem to figure out. I'm using two arrays to create columns for a report. Basically one array has all of the columns you can use and the other has which ones are actually in the report. Once you add one, to the report, it should disappear from the first array. I'm not sure how to get the index's of the values in teh array. for instance. if i have elements 0 through 5 (total of 6) and I remove #3 (now a total of 5), how do i loop through the remaining elements and still use the indexs? for ( $a = 0; $a < count( $array); $a++ ) { // } doesn't work, because when i remove elements, the count changes. the count becomes 5 and it goes from 0 to 4 instead of 5. foreach( $array as $val ) { // } doesn't work because now i don't know the indexes. so is there a way to get the index number of a value, or loop through array w/o using count, but still see the indexes? i don't mind checking if the array element exists. thanks,
  15. Does anyone have any code to search through text for a link, then add html around it to make it clickable? Should input text and output the same text w/ html links. thanks!
×
×
  • 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.