simplehtmldom 500 error - simple-html-dom

I saw that there are a lot of topics on simplehtmldom, but no one's problem seems to be mine- specifically, that it just 500s, even on the examples provided. I've found that I can include the file without an error, but if I then try to use file_get_html, it 500s. The only thing I found in the manual about installation is a possible problem with allow_fopen_url, which I do.
Something I'm missing?

Seems like too long since you asked this question, but since I came across this trying to solve this problem myself, I thought I'd post what worked for me.
I solved this problem by changing file_get_html to file_get_contents. Since I wanted to use the 'find' feature in simple_html_dom, I had to then convert the string to an object:
$string = file_get_contents(http://thedeadfallproject.com/)
$object = new simple_html_dom();
$object->load($string); // Load HTML from a string

Related

How to give Httpful a String with double quotes in it?

The idea is to send terms like bob & \\apples to a server. I get this error:
Fatal error: Maximum execution time of 30 seconds exceeded
public function index($request, $response)
{
$uri = 'http://example.org/folder?key=["bob", "\\apples"];
$content = \Httpful\Request::get($uri)->send();
return $content;
}
As user RWC pointed out, it seems to be the library which causes this error.
The mysterious thing is, that it works with only one term (?key="bob") but with two it doesn't. When I put the URL into my browser, I get back the proper results (JSON response) with one and with two terms. So at the end it works but Httpful does something I don't know of yet.
The question you are asking is very specific for the libary you are using, Httpful, and is not a pure PHP question.
This is a valid URL:
https://www.google.com/search?q=\
and so 'http://server/search?key=\' is a valid URL.
If the following command does not work
Request::get($uri)->send()
you have to blame the library (Httpful). You provided a valid URL, so in my opinion if the libary was well written, it should work.
So you have to do something to make it work. What? For that you have to read the documentation of the library.
Good to hear that you find a solution, but is has nothing to do with normal PHP.
ini_set('max_execution_time', 500);
in your script,place this one on the top,its increase the execution time of your code.

What is the RKUIManager?

I get an error with RKUIManager, or more precisely:
Could not invoke RKUIManager.manageChildren
It appears for example when I'm using firebase with React Native and try to set a reference in the constructor of a component with a prop. For ex:
messagesRef = FBRef.child("Messages").child(this.props.currentMeetingID)
If I change it to the following it works, and yes, I have checked if this.props.currentMeetingID is a legitimate value.
messagesRef = FBRef.child("Messages").child("123456789")
I can't seem to locate the problem nor reproduce it perfectly. I'm just trying to figure out if it's my machine or some kind of bug elsewhere.
Right now I'm just looking for info about what RKUIManager actually is.
If I nullcheck this.props.currentMeetingID I fix it, easy fix but nowhere to be found on the internet so I'll leave it here for anyone passing by. Probably me in a couple of weeks...

class not foundexception: oracle.jdbc,driver.OracleDriver

I wrote a code and got this error, then I searched it in Internet and all answers were about adding jdbc literary, I did it 8n several ways according others guidance in Internet but Ithe didn't work.
you have written wrong path "oracle.jdbc,driver.OracleDriver" , replace this with
"oracle.jdbc.driver.OracleDriver" because a path never contains a seprater.

find all _stringbetween occurrences within a webpage

I am working on an AutoIT script to find select messages withing a chatroom type webpage, I have no problem with placing the sent text between two special characters to make them easier to find, also to filter out all of the unwanted stuff. the problem that I am having is once the _stringbetween finds what it is looking for it doesn't continue looking. For testing I have the values returning in a GUI box. If there is a way to return all text between "^","^" it would solve my problem. Here is what i have so far
$html = _StringBetween(_INetGetSource('https://dtss.campfirenow.com/room/595835'), '^','^')
MsgBox(0, "title", $html[0])
also if anyone knows of a better way to pull select messages from campfire that would also solve my problem, maybe using the star feature... If you would like to look at the source code and api's of campfire they are available on GitHub
The _stringbetween return all occurences it will find.
You can make this simple test.
#include <array.au3>
$source="^test1^blabla^test2^blabla^test3^blabla^test4^blabla^test5^blabla"
$aRes=_StringBetween($Source,"^","^")
_ArrayDisplay($aRes)
For your source I don't now what's happening but test like this :
#include <array.au3>
$Source = BinaryToString(InetRead("https://dtss.campfirenow.com/room/595835"))
$aRes=_StringBetween($Source,"^","^")
_ArrayDisplay($aRes)
If the problem persist make a paste of your source code's page and post the link.

WatiN - getting past the certificate error page

Anyone know how to use CertificateWarningHandler in WatiN?
I've got as far as...
IE ie = new IE("https://mysite.aspx");
CertificateWarningHandler cwh = new CertificateWarningHandler(CertificateWarningHandler.ButtonsEnum.Yes);
cwh.HandleDialog(new Window(ie.hWnd));
... which does precisely nothing.
On a more general note, how on earth do you people manage to use this tool? The documentation is nearly useless, and there doesn't seem to be any decent resource online. I must be missing something because it's taken me about half an hour to write 3 lines of code that don't even work.
I'm using something similar to what Saar is using and it works fine (my tests are cross-browser).
//Override security warning in browser
{
if (Browser.Link(Find.ById("overridelink")).Exists)
{
Browser.Link(Find.ById("overridelink")).Click();
Browser.WaitForComplete();
}
else
{
Browser.WaitForComplete();
} //end else
}
I'm not a developer, and I've found that there's plenty of information out there on WatiN and others post code samples and the like that are really helpful. Google is one of my best friends when it comes to finding WatiN help. You'll get the hang of it.
have you tried following already?
ie.DialogWatcher.Add(cwh);
or just
ie.DialogWatcher.Add(new CertificateWarningHandler());
Update: After comment.
Actually this works for me.
further may be following will help
Browser browser = ie;
if (browser.Links.Exists("overridelink"))
{
browser.Link("overridelink").Click();
}

Resources