I cannot understand why this fails. Does a DOMElement need to be part of a Document? $domEl = new DOMElement(“Item”); $domEl->setAttribute(‘Something’,’bla’); Throws exception > Uncaught …
Tag: php
document.referrer – limitations?
I am unable to get a lot of referral URLS using document.referrer. I’m not sure what is going on. I would appreciate it if anyone had any info on its limitations (like which browser does not support what) etc. Is there something else i could use (in a different language perhaps) that covers more browser…
get all child element of a form in J.S
how can i get all child element(like radio,checkbox,select,text,…) within a form and make them blank using javascript. My form has many other elements like table,div etc. but i dont want to changes on these other element. Any suitable idea to get these child element(form element) through the form name(f…
fwrite() and UTF8
I am creating a file using php fwrite() and I know all my data is in UTF8 ( I have done extensive testing on this – when saving data to db and outputting on normal webpage all work fine and report as utf8.), but I am being told the file I am outputting contains non utf8 data 🙁 Is there
PHP: Possible to automatically get all POSTed data?
Simple question: Is it possible to get all the data POSTed to a page, even if you don’t know all the fields? For example, I want to write a simple script that collects any POSTed data and emails it. I can foresee that the fields in the form are likely to change a lot over time, and so to save
Calling wordnet from php (Wordnet class or API for PHP)
I am trying to write a program to find similarity between two documents, and since im using only english, I decided to use wordnet, but I cannot find a way to link the wordnet with php, I cannot find any wordnet api from php. I saw in the forum some one said (Spudley) he called wordnet from php (using shell_e…
How does facebook calculate mutual friends? [closed]
Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it’s on-topic for Stack Overflow. Closed 11 years ago. Improve this question In your opinion, how does facebook calculate mutual friends? Has it cached all mutual friends for …
How to get a 64 bit integer hash from a string in PHP?
I need 64 bit integer hashes of strings for something like a hash map. It seems to me like there is no native PHP hash functionality that can return 64 bit integers? I think it is possible to take the first part of a sha1 hash and convert it to an integer. However that will not bring the best performance
remove comments from html source code
I know how to get the html source code via cUrl, but I want to remove the comments on the html document (I mean what is between <!– .. –>). In addition, if I can take just the BODY of the html document. thank you. Answer Try PHP DOM*: Output:
Remove char from imap mail extract
I am trying to fetch a mail in imap from Google, I’m using the imap() function from PHP IMAP library and I want to use a preg_match() call on my mail content but I have a strange issue, I have curious break lines altering the normal preg_match(). More details: I have in my markup something like that: I …