php - Grabbing the information from a url? -
I have an online project "Question of the Week"; This project allows users to submit their questions. These questions are saved in a mysql table; The question is also sent to another simple post.FPP which stores the question in a phpBB. I want to use this phpBB for each question to discuss that question.
So now, my project stores the question in the SQL table as well as posts a question in phpBB.
But when the question is posted in phpBB, it stores "" in it's t = 24 question
I get somehow to capture this URL and remove T = 24 So that my project can have a click enabled link for every question that guides the question of its particular phpBB page.
Let's say your project (the user query allows you to post questions is inserted into SQL table and it also says phpBB / simplepost.php posts Questions phpBB)
and this question can be seen in php: ""
Please suggest me what I should do. How can I catch "t = 24" from this URL?
When my simplepost.php is called, then the question is posted using posting.php and a return value is sent back.
looks like code in simplepost.php:
$ title = "This is the message's title."; // $ body = "This is the main part of the message."; $ Post_fields = array ( 'theme' = & gt; $ title, 'addbbcode20' = & gt; 100, 'message' = & gt; $ body, 'lastclick' = & gt; $ lclick [0], 'post' = & Gt; ",") but ',' CREATION_TIME '= & gt; $ Lclick [0], 'form_token' = & gt; $ Security123 [1], 'filecomment; Submit ',' attach_sig '= & gt;' = = & gt; // wait (you can also try setting lastclick past sleep 3 seconds (3); // Send $ Chl = Curl_init () to set the curl session to post; curl_setopt ($ ch1, CURLOPT_URL, PURL $); Curl_setopt ($ ch1, CURLOPT_POST, true); curl_setopt ($ ch1, CURLOPT_POSTFIELDS, $ post_fields); curl_setopt ($ ch1, CURLOPT_RETURNTRANSFER, true); curl_setopt ($ ch1, CURLOPT_FOLLOWLOCATION, 1); curl_setopt ($ ch1, CURLOPT_HEADER , false); curl_setopt ($ ch1, CURLOPT_COOKIE, 'cookie.txt'); curl_setopt ($ ch1, CURLOPT_COOKIEJAR, 'cookie.txt'); curl_setopt ($ ch1, CURLOPT_COOKIEFILE, 'cookie.txt'); $ result2 = curl_exec ($ ch1); // $ result3 = curl_exec ($ ch1, CURLOPT_URL, $ PURL); curl_close ($ ch1); echo $ result2 ;.
the answer will come in $ result2 au Pages
But all this is happening at last back. My project does not display the phpBB viewtopic.php page.
If I'm not mistaken then you should be able to use PHP to store 'value' (24) in the URL 't' variable to get the value of $ _ GET ['T']
. This will only work if you are currently at that URL:
If you are not on that particular page, then you are trying to capture that segment:
ereg ("t = [0-9] / P>
Comments
Post a Comment