
muppet77
Members-
Posts
143 -
Joined
-
Last visited
Everything posted by muppet77
-
the url now has an 's' after the http $text = file_get_contents('https://www.xxx.com); and i get Warning: file_get_contents() [function.file-get-contents]: Failed to enable crypto in ....... i've tried adding the 's' to the file get contents above without luck and also added allow_url_fopen allow_url_include = On extension=php_openssl.dll allow_url_fopen = On to the php5.ini file (which is hosted in the webroot.) any ideas? thank you
-
SOLVED - i used a while loop to increase $h and reset every variable variable individually. maybe not the best way but it works. thanks all
-
Scootstah, in my example, doesn't unset only unset whatever $h is at that point in the code? If so I need to unset all keys used in the variable. Thank you.
-
Thanks. Maybe it's another part of code that is faulty as I have tried unset. (What is the advantage of not using variable variables?)
-
how do you unset or clear or empty a variable variable please? i have seen : unset($variable) but can't get this to work on variable variables. The one i am using is called ${"hcorner".$h} Any ideas please? Thank you.
-
file get contents with complicated (?) login first
muppet77 replied to muppet77's topic in PHP Coding Help
Jazzman! Please get rid of the log in details! -
file get contents with complicated (?) login first
muppet77 replied to muppet77's topic in PHP Coding Help
Please may you remove the password and user before it's changed! -
file get contents with complicated (?) login first
muppet77 replied to muppet77's topic in PHP Coding Help
DM ing you now JM -
file get contents with complicated (?) login first
muppet77 replied to muppet77's topic in PHP Coding Help
Hi jazzman. I am not keen to share my user details (even via DM). Really sorry but hope you understand. Could you (or me?) regester another account? It's free. Thanks for your time. -
file get contents with complicated (?) login first
muppet77 replied to muppet77's topic in PHP Coding Help
Thanks. Unfortunately my knowledge is not that good. I don't understand how that script logs in anywhere. Really sorry! -
file get contents with complicated (?) login first
muppet77 replied to muppet77's topic in PHP Coding Help
i know that if i go to this page http://www.bet365.com/extra/en/results-and-archive/results/?fromdate=13/09/2014%2000:00&searchpath=result&fixtureid=46827110&period=99&challengeid=26278650&competitionid=999999&sportid=1&sportdesc=soccer&todate=14/09/2014%2000:00&languageid=1&zoneid=1 i then log in and it arrives back at the same page, but with full access. There is no other page to visit, as I thought before. -
file get contents with complicated (?) login first
muppet77 replied to muppet77's topic in PHP Coding Help
Thanks Jacques1, I appreciate your advice. I am afraid I have no idea what a simple test script would look like? I am well in the deep end here. -
file get contents with complicated (?) login first
muppet77 replied to muppet77's topic in PHP Coding Help
ok, had a look at those, thank you. I get a blank page returned from this code: //init curl $ch = curl_init(); //Set the URL to work with curl_setopt($ch, CURLOPT_URL, $url); // ENABLE HTTP POST curl_setopt($ch, CURLOPT_POST, 1); //Set the post parameters curl_setopt($ch, CURLOPT_POSTFIELDS, 'user='.$username.'&pass='.$password); //Handle cookies for the login curl_setopt($ch, CURLOPT_COOKIEJAR, 'cookie.txt'); //Setting CURLOPT_RETURNTRANSFER variable to 1 will force cURL //not to print out the results of its query. //Instead, it will return the results as a string return value //from curl_exec() instead of the usual true/false. curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); //execute the request (the login) $store = curl_exec($ch); //the login is now done and you can continue to get the //protected content. //set the URL to the protected file curl_setopt($ch, CURLOPT_URL, $grab); //execute the request $content = curl_exec($ch); curl_close($ch); echo $content; $username, $password are set as my login variables and $url = 'http://www.bet365.com'; $grab = 'http://www.bet365.com/extra/en/results-and-archive/results/?Fromdate=13%2f09%2f2014+00%3a00&SearchPath=result&FixtureId=46827110&Period=99&ChallengeId=26278650&CompetitionId=999999&SportId=1&SportDesc=Soccer&Todate=14%2f09%2f2014+00%3a00&LanguageId=1&Zoneid=1'; any suggestions please? -
file get contents with complicated (?) login first
muppet77 replied to muppet77's topic in PHP Coding Help
Thank you I will do. So if I search for Curl log in ?? Please could you advise me on what I am looking for ? Really basic question but is it just curl? -
file get contents with complicated (?) login first
muppet77 replied to muppet77's topic in PHP Coding Help
thank you. please could you direct me to a good starting point for this - something similar? do you think that it is possible? I am a novice but keen to learn. don't know much about curls but a little about php other than this. -
i am trying to do a "file get contents" from the following website http://www.bet365.com/home/ It is necessary to input your account username and password here, and then I want to get the contents of this page http://www.bet365.com/extra/en/results-and-archive/results/?Fromdate=13%2f09%2f2014+00%3a00&SearchPath=result&FixtureId=46827110&Period=99&ChallengeId=26278650&CompetitionId=999999&SportId=1&SportDesc=Soccer&Todate=14%2f09%2f2014+00%3a00&LanguageId=1&Zoneid=1 I have tried a couple of scripts but just can't seem to get it to work. I have tried $context = stream_context_create(array( 'http' => array( 'header' => "Authorization: Basic " . base64_encode("$username:$password") ) )); $data = file_get_contents($url, false, $context); echo $data; with the username and password and url entered as variables. but get the message Warning: file_get_contents(http://www.bet365.com/extra/en/results-and-archive/results/?Fromdate=13%2f09%2f2014+00%3a00&SearchPath=result&FixtureId=46827110&Period=99&ChallengeId=26278650&CompetitionId=999999&SportId=1&SportDesc=Soccer&Todate=14%2f09%2f2014+00%3a00&LanguageId=1&Zoneid=1) [function.file-get-contents]: failed to open stream: HTTP request failed! in "myscript's address" on line 13 Maybe i don't need to visit the homepage first to log in? Any ideas please? Thank you apologies for the message being in code quotes, I wrote it in Word but then couldn't paste it, even using the special Word paste button. Hope the message comes out ok. Thank you.