logs archiveIRC Archive / Freenode / #php / 2015 / October / 11 / 1
danamydear
i hadn't seen that before, thanks
using that is a possibility i guess, but idk if i really want to bring yet another language and yet another dependency into this project
saveroo
hey guys, im trying to curl into asp website with viewstate, the apps sometimes works sometimes dont, it seems only work within wifi environment..
danamydear
i don't think php or curl care whether you're using wi-fi
saveroo
i know.. thats why im asking
is it the website im trying to curl into
danamydear
obv there's something else going on
stoned
danamydear, http://devzone.zend.com/1435/wrapping-c-classes-in-a-php-extension/ here
danamydear
if it works going to the same destination from a different source, it's probably the source i suppose
stoned
this is a minimal example
saveroo
the viewstate changes everything so i have to regex it everytime... perhaps it make the script runs slower
i meant "everytime" not everything
         

danamydear
stoned, i'm not having any trouble with the technical aspects of implementing it, i'm just wondering what is the most 'idiomatic' way to expose the api
saveroo
yeah.. i dunno why it works only on good connection, perhaps is it related to script execution time ?
danamydear
i know that's kind of subjective, but that's fine, i'm just looking for resources
saveroo
or the session get destroyed before the script done running all the function
danamydear
can you give an example of how it breaks
or like code or something
stoned
danamydear, look at the minimal example and you'll see that there really isn't anyway other than to map the C api on to php. It's tedious.
danamydear
well i mean the extension can expose it to php however it wants
stoned
danamydear, hence the bridge that I proposed earlier
danamydear
when i initially started working on it i thought maybe i'd make all of the 'low-level' methods protected and put them in an abstract class so that i could extend to a non-abstract class in the php
but then i thought that's kind of hacky, maybe i should have a separate class that stores an instance of the 'low-level' class as a property
&c.
i feel like the c++ library doesn't really help me make those decisions, it just makes it easier to implement it after i decide
Bad_Advice_Cat
saveroo, what exactly are you regex-ing?
__S__
Heya. I was trying to create something very easy, but it seems like php won't process my html form variables. I keep getting " PHP Notice: Undefined variable " - script: https://paste.debian.net/315285/
any idea why it won't process it?
int-main
I am trying to use SimpleDOM in PHP to parse the HTML at https://gist.github.com/ahsanaimad/dd3ac4cb158890b15737
It's super messed up code and I need to extract contents of particular table.
Would appreciate any pointers.
foo
Is there a way to run a function if the PHP script dies with an error?
larsi
foo, you can set your own error handler
see: http://php.net/manual/en/function.set-error-handler.php
profsimm
foo check out "shutdown handlers" in PHP too, they catch more errors.
They don't catch *more errors*, but more accurately, get triggered after more error conditions.
Basically all of them.
foo
larsi / profsimm - thank you
xochilpili
hi there
saveroo
hi
xochilpili
im having issues trying to make a tree array of an ldap structure
i have no more ideas and limited knowledgw
any hand?
danamydear
__S__: is it because you don't have name="submit" on your button
xochilpili: what kind of tree array
or what kind of structure
         

xochilpili
danamydear, let me paste you
__S__
omg, i feel kinda retarded right now danamydear :p
thanks
danamydear
np
daniman
i just forgot, is the right syntax to send data to the php file itself via an html form?
<form action='<?php $SERVER['PHP_SELF']; ?>'>
??
xochilpili
danamydear, this is the ouput : http://paste.fedoraproject.org/277787/44511974/
let me paste the code for you and the array itself
danamydear, i made some changes
danamydear, still here?
danamydear
yeah
what am i looking at here? the array_key_exists() errors?
xochilpili
danamydear, no, wait
please
hi
someone?
this is my code and the desired result : http://pastebin.com/ytaj79FZ
please someone
int-main
So I parse a html with find('b') and the returned text is bold. Any simple way to convert it to plain text? I'm thinking replace <b> and </b> in the string with ""
xochilpili
int-main
someone?
foo
Preferred pastebin?
xochilpili
hello?
someone?
foo
This should be easy for someone: http://pastebin.ca/3190194 - question on arrays. I'm trying to change SETTHIS - is that possible?
(It's getting set to 0)
actually, I got it, nevermind. #facepalm
xochilpili
foo you shuld do this array('SETTHIS'=>array('response' => 'reply' )) ;
should*
foo
xochilpili: thank you :)
xochilpili++
xochilpili
sure!
Harry3
(Action) Waved
(Action) Waves
xochilpili
someone?
i need a hand, please...
saveroo
.
xochilpili
saveroo, it's that for me?
http://pastebin.com/NPgVyLgp <<< please some help
Bad_Advice_Cat
!+12345
php-bot
1) What's the expected behaviour? 2) What's the observed behaviour? 2b) Are there any errors? ( /msg php-bot error reporting ) 3) How do these behaviours differ? 4) What's your current code? ( /msg php-bot pastebin ) 5) What's your current setup (OS, php version, etc...)
xochilpili
Bad_Advice_Cat, i posted!!
1) I posted, 2) i have a limited knowledge; 2b) yes; 3) dont know; 4) posted; 5) Centos, php --version : 5.3.28, etc...
Bad_Advice_Cat
xochilpili, 2) run your code and try to understand the problem. 2b) Describe the errors. 3) Then you must run your code a few times to understand the problem.
xochilpili
Bad_Advice_Cat, im limited of knowledge...
or experience, dont know, need help.
glowdemon1
Are functions inside functions a thing, and are they bad practice?
martin290
hey everyone
Bad_Advice_Cat
xochilpili, did you even wrote this code or someone else did?
xochilpili
Bad_Advice_Cat, i did it
Bad_Advice_Cat
glowdemon1, I do not know what you are asking about. Post example?
martin290
can someone tell me when I know it's a good time to start using a php framework?
Bad_Advice_Cat
Hi martin290.
« prev 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 next »